Skip to content

Error trying to use top-level await? #186

@FredKSchott

Description

@FredKSchott
>  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 #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+.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions