11 lines
189 B
TypeScript
11 lines
189 B
TypeScript
//// [typeParameterHasSelfAsConstraint.ts]
|
|
function foo<T extends T>(x: T): number {
|
|
return x;
|
|
}
|
|
|
|
|
|
|
|
//// [typeParameterHasSelfAsConstraint.js]
|
|
function foo(x) {
|
|
return x;
|
|
}
|