12 lines
535 B
Plaintext
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.
|
|
} |