mirror of https://github.com/nodejs/node.git
doc: mention --experimental-top-level-await flag
PR-URL: https://github.com/nodejs/node/pull/33473 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>pull/33529/head
parent
9dd7557c7d
commit
c39467cb47
|
@ -226,6 +226,16 @@ the ability to import a directory that has an index file.
|
|||
|
||||
Please see [customizing ESM specifier resolution][] for example usage.
|
||||
|
||||
### `--experimental-top-level-await`
|
||||
<!-- YAML
|
||||
added: v14.3.0
|
||||
-->
|
||||
|
||||
Enable experimental top-level `await` keyword support, available only in ES
|
||||
module scripts.
|
||||
|
||||
(See also `--experimental-repl-await`.)
|
||||
|
||||
### `--experimental-vm-modules`
|
||||
<!-- YAML
|
||||
added: v9.6.0
|
||||
|
|
|
@ -51,7 +51,8 @@ including the autocompleted part. Pressing `<escape>` cancels that behavior.
|
|||
|
||||
#### Support for Top-Level Await
|
||||
|
||||
It's now possible to use the await keyword outside of async functions.
|
||||
It's now possible to use the await keyword outside of async functions, with the
|
||||
`--experimental-top-level-await` flag.
|
||||
|
||||
#### Other Notable Changes
|
||||
|
||||
|
|
Loading…
Reference in New Issue