Skip to content
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

Add top level await in repl #440

Closed
esprehn opened this issue Oct 5, 2017 · 2 comments
Closed

Add top level await in repl #440

esprehn opened this issue Oct 5, 2017 · 2 comments

Comments

@esprehn
Copy link

esprehn commented Oct 5, 2017

The repl doesn't run in an async function which means you can't do ex.

var x = await db.getStuff();

and instead have to use .then() or wrap your line in an async IIFE which is ugly.

See also:
https://twitter.com/umaar/status/897408737694109697

@blakeembrey
Copy link
Member

Is it supported in the node.js REPL? Duplicate of #245. Please search before opening an issue.

@blakeembrey
Copy link
Member

Feel free to follow up in the linked issue when nodejs/node#13209 gets closed. Ideally we don't have to do anything and it just works, but since there's transpiling that might not be true. I just don't want to deviate too much from what node.js supports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants