TypeScript/tests/baselines/reference/typeArgumentsInFunctionExpressions.types
2015-04-15 16:44:20 -07:00

38 lines
637 B
Plaintext

=== tests/cases/compiler/typeArgumentsInFunctionExpressions.ts ===
var obj = function f<T>(a: T) { // should not error
>obj : <T>(a: T) => T
>function f<T>(a: T) { // should not error var x: T; return a;} : <T>(a: T) => T
>f : <T>(a: T) => T
>T : T
>a : T
>T : T
var x: T;
>x : T
>T : T
return a;
>a : T
};
var obj2 = function f<T>(a: T): T { // should not error
>obj2 : <T>(a: T) => T
>function f<T>(a: T): T { // should not error var x: T; return a;} : <T>(a: T) => T
>f : <T>(a: T) => T
>T : T
>a : T
>T : T
>T : T
var x: T;
>x : T
>T : T
return a;
>a : T
};