Closed
Description
TypeScript Version: 2.4.0 / nightly (2.5.0-dev.201xxxxx)
This issue might be a duplicate of #17276 (but it addresses another issue)
Code
The following example is straight out of the MDN docs and copied it right into TS Playground:
function* g1() {
yield 2;
yield 3;
yield 4;
}
function* g2() {
yield 1;
yield* g1(); // <- gives an error: "Type 'IterableIterator<>' is not an array type"
yield 5;
}
var iterator = g2();
Expected behavior:
Expect that the error won't appear.
Actual behavior:
Typescript throws an error that g1()
is not an array type.
Metadata
Metadata
Assignees
Labels
No labels