24 lines
426 B
Plaintext
24 lines
426 B
Plaintext
=== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck53.ts ===
|
|
class Foo { x: number }
|
|
>Foo : Foo
|
|
>x : number
|
|
|
|
class Baz { z: number }
|
|
>Baz : Baz
|
|
>z : number
|
|
|
|
function* g() {
|
|
>g : () => IterableIterator<Foo | Baz>
|
|
|
|
yield new Foo;
|
|
>yield new Foo : any
|
|
>new Foo : Foo
|
|
>Foo : typeof Foo
|
|
|
|
yield* [new Baz];
|
|
>yield* [new Baz] : any
|
|
>[new Baz] : Baz[]
|
|
>new Baz : Baz
|
|
>Baz : typeof Baz
|
|
}
|