23 lines
504 B
Plaintext
23 lines
504 B
Plaintext
=== tests/cases/compiler/inferringAnyFunctionType3.ts ===
|
|
function f<T extends ((p1: number) => number)[]>(p: T): T {
|
|
>f : <T extends ((p1: number) => number)[]>(p: T) => T
|
|
>T : T
|
|
>p1 : number
|
|
>p : T
|
|
>T : T
|
|
>T : T
|
|
|
|
return p;
|
|
>p : T
|
|
}
|
|
|
|
var v = f([x => x]);
|
|
>v : ((x: number) => number)[]
|
|
>f([x => x]) : ((x: number) => number)[]
|
|
>f : <T extends ((p1: number) => number)[]>(p: T) => T
|
|
>[x => x] : ((x: number) => number)[]
|
|
>x => x : (x: number) => number
|
|
>x : number
|
|
>x : number
|
|
|