1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
=== tests/cases/compiler/typeArgumentsOnFunctionsWithNoTypeParameters.ts ===
function foo<T, U>(f: (v: T) => U) {
>foo : Symbol(foo, Decl(typeArgumentsOnFunctionsWithNoTypeParameters.ts, 0, 0))
>T : Symbol(T, Decl(typeArgumentsOnFunctionsWithNoTypeParameters.ts, 0, 13))
>U : Symbol(U, Decl(typeArgumentsOnFunctionsWithNoTypeParameters.ts, 0, 15))
>f : Symbol(f, Decl(typeArgumentsOnFunctionsWithNoTypeParameters.ts, 0, 19))
>v : Symbol(v, Decl(typeArgumentsOnFunctionsWithNoTypeParameters.ts, 0, 23))
>T : Symbol(T, Decl(typeArgumentsOnFunctionsWithNoTypeParameters.ts, 0, 13))
>U : Symbol(U, Decl(typeArgumentsOnFunctionsWithNoTypeParameters.ts, 0, 15))
var r1 = f<number>(1);
>r1 : Symbol(r1, Decl(typeArgumentsOnFunctionsWithNoTypeParameters.ts, 1, 6))
>f : Symbol(f, Decl(typeArgumentsOnFunctionsWithNoTypeParameters.ts, 0, 19))
var r2 = f(1);
>r2 : Symbol(r2, Decl(typeArgumentsOnFunctionsWithNoTypeParameters.ts, 2, 6))
>f : Symbol(f, Decl(typeArgumentsOnFunctionsWithNoTypeParameters.ts, 0, 19))
var r3 = f<any>(null);
>r3 : Symbol(r3, Decl(typeArgumentsOnFunctionsWithNoTypeParameters.ts, 3, 6))
>f : Symbol(f, Decl(typeArgumentsOnFunctionsWithNoTypeParameters.ts, 0, 19))
var r4 = f(null);
>r4 : Symbol(r4, Decl(typeArgumentsOnFunctionsWithNoTypeParameters.ts, 4, 6))
>f : Symbol(f, Decl(typeArgumentsOnFunctionsWithNoTypeParameters.ts, 0, 19))
}
|