// interfaces that merge must not have members that conflict interface A { foo(x: number): number; foo(x: string): string; } interface A { foo(x: Date): Date; } interface B { foo(x: T): number; foo(x: string): string; } interface B { foo(x: T): Date; foo(x: Date): string; } var b: B; var r = b.foo(true); // returns Date // add generic overload interface C { foo(x: T, y: U): string; foo(x: string, y: string): number; } interface C { foo(x: W, y: W): W; } var c: C; var r2 = c.foo(1, 2); // number // add generic overload that would be ambiguous interface D { a: T; b: U; foo(x: A, y: A): U; } interface D { foo(x: W, y: W): T; } var d: D; var r3 = d.foo(1, 1); // boolean, last definition wins