Skip to content

for await syntax missing from ES2018 target #28499

Closed
@wolfy1339

Description

@wolfy1339

TypeScript Version: 3.1.6

Search Terms: for await, es2018, target

Code

export = async function() {
    for await (let x of []) {
        // Do something async here
    }
}

Expected behavior: For the ES2018 target to not use polyfills for the for await syntax.
As per tc39/proposal-async-iteration#131 (comment) it is in ES2018

Actual behavior: Uses polyfills

Playground Link: Can't. The playground targets a version that is unknown and not configurable in order to show the issue

Related Issues:

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions