Skip to content

for await syntax missing from ES2018 target #28499

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wolfy1339 opened this issue Nov 13, 2018 · 3 comments
Closed

for await syntax missing from ES2018 target #28499

wolfy1339 opened this issue Nov 13, 2018 · 3 comments
Labels
Duplicate An existing issue was already created

Comments

@wolfy1339
Copy link

wolfy1339 commented Nov 13, 2018

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:

@wolfy1339
Copy link
Author

Another source for you: https://github.com/tc39/proposals/blob/master/finished-proposals.md The proposal is finished and was ratified as part of ES2018

@weswigham
Copy link
Member

Ref #20463 which is tracking moving this and rest/spread into a dedicated es2018 transformer and out of the esnext transformer.

@weswigham weswigham added the Duplicate An existing issue was already created label Nov 13, 2018
@typescript-bot
Copy link
Collaborator

This issue has been marked as a duplicate and has seen no activity in the last day. It has been closed for automatic house-keeping purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

3 participants