import await a, { b, c } from "top-level-await.js"; import await a, { b, c } from "module.wasm"; import async aPromise, { bPromise, cPromise } from "module2.js"; import a from "top-level-await.js"; // <- Error
Last sentence is confusing. Seems odd if you have: import await bar from './bar.js'; And then: import bar from './bar.js'; In another. Unless it's required? Unclear what this is trying to solve.
-
-
The idea is that there are two kinds of modules (normal/sync modules and async modules) and it's explicit on import which kind of module is imported (like calling an async function need to have an explicit await). Using this syntax would probably avoid the breaking ESM change.
-
What breaking ESM change are you referring to?
- 10 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
he/him 