7 lines
186 B
TypeScript
7 lines
186 B
TypeScript
//// [typeInferenceWithTypeAnnotation.ts]
|
|
declare function f<T>(p: (t: T) => T): T;
|
|
|
|
f((n: number) => n);
|
|
|
|
//// [typeInferenceWithTypeAnnotation.js]
|
|
f(function (n) { return n; });
|