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

20 lines
684 B
Plaintext
Raw Normal View History

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; }
~~
!!! Interface 'i2' incorrectly extends interface 'i1':
!!! Types of property 'name' are incompatible:
!!! Type 'number' is not assignable to type 'string'.
interface foo {
bar():any;
~~~~~~~~~~
!!! Property 'bar' of type '{ (): any; (): any; }' is not assignable to string index type 'number'.
bar():any;
new():void;
new():void;
[s:string]:number;
[s:string]:number;
~~~~~~~~~~~~~~~~~~
!!! Duplicate string index signature.
}