Skip to content

Commit fe23ce2

Browse files
committed
doc: Mention --experimental-top-level-await flag
1 parent 51af89f commit fe23ce2

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

doc/api/cli.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,16 @@ the ability to import a directory that has an index file.
226226

227227
Please see [customizing ESM specifier resolution][] for example usage.
228228

229+
### `--experimental-top-level-await`
230+
<!-- YAML
231+
added: v14.3.0
232+
-->
233+
234+
Enable experimental top-level `await` keyword support, available only in ES
235+
module scripts.
236+
237+
(See also `--experimental-repl-await`.)
238+
229239
### `--experimental-vm-modules`
230240
<!-- YAML
231241
added: v9.6.0

doc/changelogs/CHANGELOG_V14.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ including the autocompleted part. Pressing `<escape>` cancels that behavior.
5151

5252
#### Support for Top-Level Await
5353

54-
It's now possible to use the await keyword outside of async functions.
54+
It's now possible to use the await keyword outside of async functions, with the
55+
`--experimental-top-level-await` flag.
5556

5657
#### Other Notable Changes
5758

0 commit comments

Comments
 (0)