13 lines
653 B
Plaintext
13 lines
653 B
Plaintext
tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck31.ts(2,11): error TS2322: Type 'IterableIterator<(x: any) => any>' is not assignable to type '() => Iterable<(x: string) => number>'.
|
|
|
|
|
|
==== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck31.ts (1 errors) ====
|
|
function* g2(): Iterator<() => Iterable<(x: string) => number>> {
|
|
yield function* () {
|
|
~~~~~~~~~~~~~~
|
|
yield x => x.length;
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
} ()
|
|
~~~~~~~~
|
|
!!! error TS2322: Type 'IterableIterator<(x: any) => any>' is not assignable to type '() => Iterable<(x: string) => number>'.
|
|
} |