TypeScript/tests/baselines/reference/genericFunctions1.types
2014-08-25 10:55:22 -07:00

13 lines
236 B
Text

=== tests/cases/compiler/genericFunctions1.ts ===
function foo<T > (x: T) { return x; }
>foo : typeof foo
>T : T
>x : T
>T : T
>x : T
var x = foo(5); // 'x' should be number
>x : number
>foo(5) : number
>foo : typeof foo