14 lines
573 B
Plaintext
14 lines
573 B
Plaintext
|
tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck20.ts(5,13): error TS2322: Type 'Baz' is not assignable to type 'Foo'.
|
||
|
Property 'x' is missing in type 'Baz'.
|
||
|
|
||
|
|
||
|
==== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck20.ts (1 errors) ====
|
||
|
class Foo { x: number }
|
||
|
class Baz { z: number }
|
||
|
function* g(): IterableIterator<Foo> {
|
||
|
yield;
|
||
|
yield * [new Baz];
|
||
|
~~~~~~~~~
|
||
|
!!! error TS2322: Type 'Baz' is not assignable to type 'Foo'.
|
||
|
!!! error TS2322: Property 'x' is missing in type 'Baz'.
|
||
|
}
|