1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
tests/cases/compiler/interfacePropertiesWithSameName3.ts(3,11): error TS2320: Interface 'F' cannot simultaneously extend types 'E' and 'D'.
Named property 'a' of types 'E' and 'D' are not identical.
tests/cases/compiler/interfacePropertiesWithSameName3.ts(7,11): error TS2320: Interface 'F2' cannot simultaneously extend types 'E2' and 'D2'.
Named property 'a' of types 'E2' and 'D2' are not identical.
==== tests/cases/compiler/interfacePropertiesWithSameName3.ts (2 errors) ====
interface D { a: number; }
interface E { a: string; }
interface F extends E, D { } // error
~
!!! error TS2320: Interface 'F' cannot simultaneously extend types 'E' and 'D'.
!!! error TS2320: Named property 'a' of types 'E' and 'D' are not identical.
class D2 { a: number; }
class E2 { a: string; }
interface F2 extends E2, D2 { } // error
~~
!!! error TS2320: Interface 'F2' cannot simultaneously extend types 'E2' and 'D2'.
!!! error TS2320: Named property 'a' of types 'E2' and 'D2' are not identical.
|