13 lines
No EOL
653 B
Text
13 lines
No EOL
653 B
Text
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>'.
|
|
} |