TypeScript/tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck45.ts
2015-05-04 16:15:55 -07:00

4 lines
203 B
TypeScript

//@target: ES6
declare function foo<T, U>(x: T, fun: () => Iterator<(x: T) => U>, fun2: (y: U) => T): T;
foo("", function* () { yield x => x.length }, p => undefined); // T is fixed, should be string