TypeScript/tests/baselines/reference/generatorTypeCheck24.js
2015-05-04 16:15:55 -07:00

29 lines
488 B
TypeScript

//// [generatorTypeCheck24.ts]
class Foo { x: number }
class Bar extends Foo { y: string }
class Baz { z: number }
function* g3() {
yield;
yield * [new Foo];
yield new Bar;
yield new Baz;
yield *[new Bar];
yield *[new Baz];
}
//// [generatorTypeCheck24.js]
class Foo {
}
class Bar extends Foo {
}
class Baz {
}
function* g3() {
yield;
yield* [new Foo];
yield new Bar;
yield new Baz;
yield* [new Bar];
yield* [new Baz];
}