25 lines
452 B
Plaintext
25 lines
452 B
Plaintext
=== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck54.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[]
|
|
>new Foo : Foo
|
|
>Foo : typeof Foo
|
|
|
|
yield* [new Baz];
|
|
>yield* [new Baz] : any
|
|
>[new Baz] : Baz[]
|
|
>new Baz : Baz
|
|
>Baz : typeof Baz
|
|
}
|