Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: Mention --experimental-top-level-await flag #33473

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions doc/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion doc/changelogs/CHANGELOG_V14.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down