TypeScript/tests/baselines/reference/generatorTypeCheck20.errors.txt
2015-05-04 16:15:55 -07:00

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'.
}