swc/crates/swc_ecma_parser/tests/tsc/twoMergedInterfacesWithDifferingOverloads2.ts

31 lines
446 B
TypeScript
Raw Normal View History

interface A {
(): string;
(x: number): number;
}
interface A {
(x: number, y: number): boolean;
}
var a: A;
var r = a();
var r2 = a(1);
var r3 = a(1, 2);
module G {
interface A<T> {
(): string;
(x: T): T;
}
interface A<T> {
(x: T, y: number): T;
<U>(x: U, y: T): U;
}
var a: A<boolean>;
var r = a();
var r2 = a(true);
var r3 = a(true, 2);
var r4 = a(1, true);
}