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

Make top level await work #9

Open
brigand opened this issue Feb 3, 2018 · 2 comments
Open

Make top level await work #9

brigand opened this issue Feb 3, 2018 · 2 comments

Comments

@brigand
Copy link
Owner

brigand commented Feb 3, 2018

Would require some babel code to handle the completion record

@caub
Copy link
Contributor

caub commented May 13, 2018

Why not wrap evaluated code in a (async()=>{ /* code */ })().catch(e => {..}).then(r => {..})?

it won't output the last statement though, it's possible to transform with babel (to capture the last statement) or like you said

edit : attempt: https://repl.it/@caub/babel-consolify, this kind of thing would allow to wrap in the iiafe

@ljharb
Copy link
Contributor

ljharb commented May 13, 2018

top-level await is still not fully specified; i'm not sure it's worth trying to implement yet.

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

No branches or pull requests

3 participants