12 lines
250 B
TypeScript
12 lines
250 B
TypeScript
//// [inferringAnyFunctionType2.ts]
|
|
function f<T extends [(p1: number) => number]>(p: T): T {
|
|
return p;
|
|
}
|
|
|
|
var v = f([x => x]);
|
|
|
|
//// [inferringAnyFunctionType2.js]
|
|
function f(p) {
|
|
return p;
|
|
}
|
|
var v = f([function (x) { return x; }]);
|