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

12 lines
535 B
Plaintext

tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck21.ts(5,13): error TS2488: Type must have a '[Symbol.iterator]()' method that returns an iterator.
==== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck21.ts (1 errors) ====
class Foo { x: number }
class Bar extends Foo { y: string }
function* g(): IterableIterator<Foo> {
yield;
yield * new Bar;
~~~~~~~
!!! error TS2488: Type must have a '[Symbol.iterator]()' method that returns an iterator.
}