9 lines
277 B
TypeScript
9 lines
277 B
TypeScript
//// [genericParameterAssignability1.ts]
|
|
function f<T>(x: T): T { return null; }
|
|
var r = <T>(x: T) => x;
|
|
r = f; // should be allowed
|
|
|
|
//// [genericParameterAssignability1.js]
|
|
function f(x) { return null; }
|
|
var r = function (x) { return x; };
|
|
r = f; // should be allowed
|