2014-10-01 02:15:18 +02:00
|
|
|
tests/cases/compiler/interfaceDeclaration1.ts(2,5): error TS2300: Duplicate identifier 'item'.
|
2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/compiler/interfaceDeclaration1.ts(3,5): error TS2300: Duplicate identifier 'item'.
|
2014-10-01 02:15:18 +02:00
|
|
|
tests/cases/compiler/interfaceDeclaration1.ts(7,5): error TS2300: Duplicate identifier 'item'.
|
2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/compiler/interfaceDeclaration1.ts(8,5): error TS2300: Duplicate identifier 'item'.
|
|
|
|
tests/cases/compiler/interfaceDeclaration1.ts(22,11): error TS2310: Type 'I5' recursively references itself as a base type.
|
2014-10-28 08:28:59 +01:00
|
|
|
tests/cases/compiler/interfaceDeclaration1.ts(35,7): error TS2420: Class 'C1' incorrectly implements interface 'I3'.
|
2014-09-12 22:35:07 +02:00
|
|
|
Property 'prototype' is missing in type 'C1'.
|
|
|
|
tests/cases/compiler/interfaceDeclaration1.ts(41,11): error TS2310: Type 'i8' recursively references itself as a base type.
|
2014-10-28 08:28:59 +01:00
|
|
|
tests/cases/compiler/interfaceDeclaration1.ts(52,11): error TS2320: Interface 'i12' cannot simultaneously extend types 'i10' and 'i11'.
|
2014-09-12 22:35:07 +02:00
|
|
|
Named properties 'foo' of types 'i10' and 'i11' are not identical.
|
|
|
|
|
|
|
|
|
2014-10-01 02:15:18 +02:00
|
|
|
==== tests/cases/compiler/interfaceDeclaration1.ts (8 errors) ====
|
2014-07-13 01:04:16 +02:00
|
|
|
interface I1 {
|
|
|
|
item:number;
|
|
|
|
~~~~
|
2014-10-01 02:15:18 +02:00
|
|
|
!!! error TS2300: Duplicate identifier 'item'.
|
|
|
|
item:number;
|
2014-10-01 20:27:20 +02:00
|
|
|
~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2300: Duplicate identifier 'item'.
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
interface I2 {
|
|
|
|
item:any;
|
|
|
|
~~~~
|
2014-10-01 02:15:18 +02:00
|
|
|
!!! error TS2300: Duplicate identifier 'item'.
|
|
|
|
item:number;
|
2014-10-01 20:27:20 +02:00
|
|
|
~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2300: Duplicate identifier 'item'.
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
interface I3 {
|
|
|
|
prototype:number;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface I4 {
|
|
|
|
class:number;
|
|
|
|
number:number;
|
|
|
|
super:number;
|
|
|
|
prototype:number;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface I5 extends I5 {
|
2014-07-19 02:30:06 +02:00
|
|
|
~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2310: Type 'I5' recursively references itself as a base type.
|
2014-07-13 01:04:16 +02:00
|
|
|
foo():void;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface I6 {
|
|
|
|
():void;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface I7 extends I6 { }
|
|
|
|
|
|
|
|
var v1:I7;
|
|
|
|
v1();
|
|
|
|
|
|
|
|
class C1 implements I3 {
|
|
|
|
~~
|
2014-10-28 08:28:59 +01:00
|
|
|
!!! error TS2420: Class 'C1' incorrectly implements interface 'I3'.
|
|
|
|
!!! error TS2420: Property 'prototype' is missing in type 'C1'.
|
2014-07-13 01:04:16 +02:00
|
|
|
constructor() {
|
|
|
|
var prototype: number = 3;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
interface i8 extends i9 { }
|
2014-07-19 02:30:06 +02:00
|
|
|
~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2310: Type 'i8' recursively references itself as a base type.
|
2014-07-13 01:04:16 +02:00
|
|
|
interface i9 extends i8 { }
|
|
|
|
|
|
|
|
interface i10 {
|
|
|
|
foo():number;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface i11{
|
|
|
|
foo():string;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface i12 extends i10, i11 { }
|
|
|
|
~~~
|
2014-10-28 08:28:59 +01:00
|
|
|
!!! error TS2320: Interface 'i12' cannot simultaneously extend types 'i10' and 'i11'.
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2320: Named properties 'foo' of types 'i10' and 'i11' are not identical.
|
2014-07-13 01:04:16 +02:00
|
|
|
|