Files
tsgo/testdata/baselines/reference/submodule/compiler/genericFunctions1.js

17 lines
378 B
TypeScript

//// [tests/cases/compiler/genericFunctions1.ts] ////
//// [genericFunctions1.ts]
function foo<T > (x: T) { return x; }
var x = foo(5); // 'x' should be number
//// [genericFunctions1.js]
"use strict";
function foo(x) { return x; }
var x = foo(5); // 'x' should be number
//// [genericFunctions1.d.ts]
declare function foo<T>(x: T): T;
declare var x: number;