You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@Hume83 do you mean what the node repl or chrome console does? There is some special treatment for top level await.
In regular JavaScript and TypeScript this is not valid. You can try it yourself by saving the code snippet to a file and execute that file with node.
You are right, excuse my ignorance, I have tried it fast in the console, it would be a really great feature, to avoid the unnecessary use of async function in some cases. Could this feature be available in the future of Javascript?
Thanks for your answer mate.
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.
Activity
ajafff commentedon Dec 28, 2017
@Hume83 do you mean what the node repl or chrome console does? There is some special treatment for top level await.
In regular JavaScript and TypeScript this is not valid. You can try it yourself by saving the code snippet to a file and execute that file with node.
horacioriv commentedon Dec 28, 2017
You are right, excuse my ignorance, I have tried it fast in the console, it would be a really great feature, to avoid the unnecessary use of async function in some cases. Could this feature be available in the future of Javascript?
Thanks for your answer mate.
typescript-bot commentedon Jan 12, 2018
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.