1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
//// [tests/cases/compiler/overloadOnConstInheritance2.ts] ////
=== overloadOnConstInheritance2.ts ===
interface Base {
addEventListener(x: string): any;
>addEventListener : { (x: string): any; (x: "foo"): string; }
>x : string
addEventListener(x: 'foo'): string;
>addEventListener : { (x: string): any; (x: 'foo'): string; }
>x : "foo"
}
interface Deriver extends Base {
addEventListener(x: 'bar'): string; // shouldn't need to redeclare the string overload
>addEventListener : (x: 'bar') => string
>x : "bar"
}
|