Closed
Description
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?