TypeScript/tests/baselines/reference/interfaceMemberValidation.errors.txt

27 lines
1.2 KiB
Plaintext
Raw Normal View History

tests/cases/compiler/interfaceMemberValidation.ts(2,11): error TS2430: Interface 'i2' incorrectly extends interface 'i1'.
Types of property 'name' are incompatible.
Type 'number' is not assignable to type 'string'.
tests/cases/compiler/interfaceMemberValidation.ts(5,2): error TS2411: Property 'bar' of type '{ (): any; (): any; }' is not assignable to string index type 'number'.
tests/cases/compiler/interfaceMemberValidation.ts(10,2): error TS2374: Duplicate string index signature.
2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/interfaceMemberValidation.ts (3 errors) ====
interface i1 { name: string; }
interface i2 extends i1 { name: number; yo: string; }
~~
!!! error TS2430: Interface 'i2' incorrectly extends interface 'i1'.
!!! error TS2430: Types of property 'name' are incompatible.
!!! error TS2430: Type 'number' is not assignable to type 'string'.
2014-07-13 01:04:16 +02:00
interface foo {
bar():any;
~~~~~~~~~~
!!! error TS2411: Property 'bar' of type '{ (): any; (): any; }' is not assignable to string index type 'number'.
2014-07-13 01:04:16 +02:00
bar():any;
new():void;
new():void;
[s:string]:number;
[s:string]:number;
~~~~~~~~~~~~~~~~~~
!!! error TS2374: Duplicate string index signature.
2014-07-13 01:04:16 +02:00
}