Skip to content
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

Transpiled async generators return a promise value #23731

Closed
falsandtru opened this issue Apr 27, 2018 · 2 comments
Closed

Transpiled async generators return a promise value #23731

falsandtru opened this issue Apr 27, 2018 · 2 comments
Labels
Duplicate An existing issue was already created

Comments

@falsandtru
Copy link
Contributor

falsandtru commented Apr 27, 2018

At least Chrome unwraps promise values. This makes a different runtime behavior.

TypeScript Version: 2.7.0-dev.201xxxxx

Search Terms:

Code

(async function* () {yield Promise.resolve(0)})().next().then(console.log)

Expected behavior:

Outputs {value: 0, done: false}.

Actual behavior:

Outputs {value: Promise, done: false}.

Playground Link:

Related Issues:

@Jessidhia
Copy link

Related to #21115

@falsandtru
Copy link
Contributor Author

Thanks, it seems to address the same issue.

@mhegazy mhegazy added the Duplicate An existing issue was already created label Apr 30, 2018
@microsoft microsoft locked and limited conversation to collaborators Jul 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

3 participants