mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
41 lines
602 B
TypeScript
41 lines
602 B
TypeScript
//// [tests/cases/compiler/genericOverloadSignatures.ts] ////
|
|
|
|
//// [genericOverloadSignatures.ts]
|
|
interface A {
|
|
<T>(x: T): void;
|
|
<T>(x: T): void;
|
|
}
|
|
|
|
function f<T>(a: T);
|
|
function f<T>(a: T);
|
|
function f(a) { }
|
|
|
|
interface I2 {
|
|
f<T>(x: T): number;
|
|
f<T>(x: T): string;
|
|
}
|
|
|
|
interface I3<T> {
|
|
f(x: T): number;
|
|
f(x: T): string;
|
|
}
|
|
|
|
class C2<T> {
|
|
}
|
|
var b: {
|
|
new <T>(x: T, y: string): C2<T>;
|
|
new <T>(x: T, y: string): C2<T>;
|
|
}
|
|
|
|
interface D {
|
|
<T>(x: T): T;
|
|
<T>(x: T): T;
|
|
}
|
|
|
|
//// [genericOverloadSignatures.js]
|
|
"use strict";
|
|
function f(a) { }
|
|
class C2 {
|
|
}
|
|
var b;
|