Skip to content

Transpiled async generators don't unwrap returned promise values #24173

@falsandtru

Description

@falsandtru

cc @rbuckton

TypeScript Version: 2.9.0-dev.20180515

Search Terms:

Code

await (async function* () { return Promise.resolve(0); })().next()
// also should be covered by tests
await (async function* () { return Promise.reject(1); })().next()

Expected behavior:

Object{value: 0, done: true}

Actual behavior:

Object{value: Promise{}, done: true}

Playground Link:

Related Issues:

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions