2014-10-28 08:28:59 +01:00
tests/cases/compiler/overloadOnConstInheritance3.ts(4,11): error TS2430: Interface 'Deriver' incorrectly extends interface 'Base'.
Types of property 'addEventListener' are incompatible.
2014-09-12 22:35:07 +02:00
Type '{ (x: 'bar'): string; (x: 'foo'): string; }' is not assignable to type '(x: string) => any'.
tests/cases/compiler/overloadOnConstInheritance3.ts(6,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature.
tests/cases/compiler/overloadOnConstInheritance3.ts(7,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature.
2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/overloadOnConstInheritance3.ts (3 errors) ====
interface Base {
addEventListener(x: string): any;
}
interface Deriver extends Base {
~~~~~~~
2014-10-28 08:28:59 +01:00
!!! error TS2430: Interface 'Deriver' incorrectly extends interface 'Base'.
!!! error TS2430: Types of property 'addEventListener' are incompatible.
!!! error TS2430: Type '{ (x: 'bar'): string; (x: 'foo'): string; }' is not assignable to type '(x: string) => any'.
2014-07-13 01:04:16 +02:00
// shouldn't need to redeclare the string overload
addEventListener(x: 'bar'): string;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature.
2014-07-13 01:04:16 +02:00
addEventListener(x: 'foo'): string;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature.
2014-07-13 01:04:16 +02:00
}