meriyah: Error trying to use top-level await?

>  require('meriyah').parseModule('const foo = (await bar)', {next: true})
Uncaught: [ParseError [SyntaxError]: [1:18]: 'Await' may not be used as an identifier in this context] {
  index: 18,
  line: 1,
  column: 18,
  description: "[1:18]: 'Await' may not be used as an identifier in this context",
  loc: { line: 1, column: 18 }
}

I found https://github.com/meriyah/meriyah/issues/29 but it looks like that issue may have been closed without implementation.

Top-level await is now stage 3, and supported in Node.js v14+.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 19 (15 by maintainers)

Commits related to this issue

Most upvoted comments

v4.2.0 is released with this feature.