TypeScript/tests/cases/compiler/contextualTypingFunctionReturningFunction.ts
Andy fe3a05e89a A function should be context-sensitive if its return expression is (#17697)
* A function should be context-sensitive if its return expression is

* Remove outdated comment

* Fix typo
2017-08-10 07:08:24 -07:00

12 lines
138 B
TypeScript

interface I {
a(s: string): void;
b(): (n: number) => void;
}
declare function f(i: I): void;
f({
a: s => {},
b: () => n => {},
});