17 lines
270 B
TypeScript
17 lines
270 B
TypeScript
//// [generatorTypeCheck18.ts]
|
|
class Foo { x: number }
|
|
class Baz { z: number }
|
|
function* g(): IterableIterator<Foo> {
|
|
yield;
|
|
yield new Baz;
|
|
}
|
|
|
|
//// [generatorTypeCheck18.js]
|
|
class Foo {
|
|
}
|
|
class Baz {
|
|
}
|
|
function* g() {
|
|
yield;
|
|
yield new Baz;
|
|
}
|