Skip to content

Commit

Permalink
doc: mention --experimental-top-level-await flag
Browse files Browse the repository at this point in the history
PR-URL: #33473
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
dfabulich authored and codebytere committed Jun 18, 2020
1 parent 066e719 commit 921a371
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
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 @@ -73,7 +73,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

0 comments on commit 921a371

Please sign in to comment.