TypeScript/tests/baselines/reference/generatorTypeCheck21.errors.txt

12 lines
535 B
Plaintext
Raw Normal View History

2015-05-05 01:15:55 +02:00
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.
}