Content-Length: 276807 | pFad | https://github.com/microsoft/TypeScript/issues/8559

B4 ES6 modules cannot use "await" as an identifier · Issue #8559 · microsoft/TypeScript · GitHub
Skip to content

ES6 modules cannot use "await" as an identifier #8559

@evmar

Description

@evmar

According to http://www.ecma-international.org/ecma-262/6.0/#sec-future-reserved-words
"await is only treated as a FutureReservedWord when Module is the goal symbol of the syntactic grammar."

This code should be illegal I think:
http://www.typescriptlang.org/play/#src=import%20'foo'%3B%0A%0Alet%20await%20%3D%203%3B

Came up when discussing TS semantics with @ajklein (v8 ES6 module expert).

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptES6Relates to the ES6 Spec

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: https://github.com/microsoft/TypeScript/issues/8559

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy