Open Masterxilo opened 5 years ago
This is still an experimental feature, if you want to test it, please use ijavascript-await.
You can also do this:
(async () => {
const request = require('async-request')
let result = await request("http://google.com")
console.log({result})
})()
Is this still experimental or does it work in regular ijavascript now? I see ijavascript-await hasn't been updated for three years.
Judging from https://github.com/n-riesco/ijavascript/compare/await?expand=1 looks like it's not merged
People on this thread may be interested in https://github.com/n-riesco/ijavascript/pull/257
Good news! Node.js v16.6+ (released at the end of July) finally supports top level await
out of the box.
There is no need for ijavascript-await
and I'll deprecate it now.
:disappointed: I jumped the gun. When I wrote my previous message, I was testing directly on Node.js CLI. Unfortunately, ijavascript
is affected by https://github.com/nodejs/node/issues/40898 .
I've undeprecated ijavascript-await
and I'll publish a new releases including the updates in the latest ijavascript
soon.
What is the status on await support?
I haven't looked into supporting await recently, but judging by https://github.com/nodejs/node/issues/45924 , I don't think it is.
I suppose ijavascript-await
is still working (as I haven't had anyone opening issues for it).
I suppose ijavascript-await is still working (as I haven't had anyone opening issues for it).
@n-riesco I ran into this issue while installing kernel of ijavascript-await
- please have a look.
should just work, like it does in the chrome dev console and
node --experimental-repl-await
.For interactive use especially, this is much more convenient.
versus