Skip to content

Playground doesn't support async generators. #15

@cakoose

Description

@cakoose

I put the following code into https://www.typescriptlang.org/play/

async function f(): Promise<number> {
    return 1;
}

async function* g(): AsyncIterator<number> {
    yield 1;
    await f();
    return 2;
}

The compiler reports two errors on the async function *g() line.

  • Cannot find global type 'AsyncIterableIterator'
  • Cannot find name 'AsyncIterator'

Is that expected?

Metadata

Metadata

Labels

PlaygroundIssues that affect the PlaygroundPlayground ATAHoles in the current type acquisition

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions