TypeScript/tests/cases/conformance/generators/generatorReturnTypeIndirectReferenceToGlobalType.ts
Andrew Branch 083129f005
A union including non-iterable types is not iterable (#40350)
* WIP

* If method type derives solely from the global iterator or generator type, use its type arguments

* Add test for problem fixed as side effect
2020-09-11 09:31:22 -07:00

10 lines
136 B
TypeScript

// @strict: true
// @target: esnext
interface I1 extends Iterator<0, 1, 2> {}
function* f1(): I1 {
const a = yield 0;
return 1;
}