mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
13 lines
344 B
TypeScript
13 lines
344 B
TypeScript
//// [tests/cases/compiler/genericParameterAssignability1.ts] ////
|
|
|
|
//// [genericParameterAssignability1.ts]
|
|
function f<T>(x: T): T { return null; }
|
|
var r = <T>(x: T) => x;
|
|
r = f; // should be allowed
|
|
|
|
//// [genericParameterAssignability1.js]
|
|
"use strict";
|
|
function f(x) { return null; }
|
|
var r = (x) => x;
|
|
r = f; // should be allowed
|