New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support for asynchronicity in monaco-run #1505
Comments
The code is runned in a async context currently. You can use the It is possible to override |
It is probably a better approach then, because my solution currently has issues when exporting. But would it mean the program would only show the result once all |
Yes. And we can improve this in the future. |
Is your feature request related to a problem? Please describe.
When using async code in monaco run, later lines are not added. For example the following snippets only show 1 and 3 because the output is built synchronously.
Describe the solution you'd like
I'd like the code output to be updated when the new log shows up.
Describe alternatives you've considered
Currently, I have successfully patched the ts-runner to return an element that mimics what
<CodeRunner />
(frominternals
) outputs, but imperatively.I am willing to make my patch a PR if the maintainers are interested. However I believe the best way to handle this would be to supports async generators as
CodeRunnerOutputs
. This way it would provide the functionality to all runners, and they won't have to manually do the little work (highlighting, etc) I am currently doing (since I am bypassing and replicating the usual rendering). I don't think it would be too hard to do, and am willing to give it a crack if the maintainers are interested (though expect delays).The text was updated successfully, but these errors were encountered: