-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
await should work in REPL #3700
Comments
Node seems to be using a |
TLA only works in V8 module contexts - because the REPL is a traditional script context it can't do TLA. Same root cause as #1285. (#1285 (comment)) - if the REPL will move to a module context, which would be nice, this would work out of the box. For now we could do the same as chrome dev tools and node which both just wrap the call in an async function. |
I think that would be hard, because a module needs to be "closed" so its imports and exports and be analysed. It would effectively need to rerun the whole "module" every time a line is added. Only script contexts can really be open-ended like that, which means a few things have to be frigged. |
Yeah. And running a module again and again might yield unexpected repeated side effects (e.g. console.log multiple times) |
The text was updated successfully, but these errors were encountered: