12 lines
No EOL
535 B
Text
12 lines
No EOL
535 B
Text
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.
|
|
} |