84 lines
No EOL
2.7 KiB
Text
84 lines
No EOL
2.7 KiB
Text
tests/cases/compiler/interfaceDeclaration1.ts(2,5): error TS2300: Duplicate identifier 'item'.
|
|
tests/cases/compiler/interfaceDeclaration1.ts(3,5): error TS2300: Duplicate identifier 'item'.
|
|
tests/cases/compiler/interfaceDeclaration1.ts(7,5): error TS2300: Duplicate identifier 'item'.
|
|
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.
|
|
tests/cases/compiler/interfaceDeclaration1.ts(35,7): error TS2420: Class 'C1' incorrectly implements interface 'I3'.
|
|
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.
|
|
tests/cases/compiler/interfaceDeclaration1.ts(52,11): error TS2320: Interface 'i12' cannot simultaneously extend types 'i10' and 'i11'.
|
|
Named property 'foo' of types 'i10' and 'i11' are not identical.
|
|
|
|
|
|
==== tests/cases/compiler/interfaceDeclaration1.ts (8 errors) ====
|
|
interface I1 {
|
|
item:number;
|
|
~~~~
|
|
!!! error TS2300: Duplicate identifier 'item'.
|
|
item:number;
|
|
~~~~
|
|
!!! error TS2300: Duplicate identifier 'item'.
|
|
}
|
|
|
|
interface I2 {
|
|
item:any;
|
|
~~~~
|
|
!!! error TS2300: Duplicate identifier 'item'.
|
|
item:number;
|
|
~~~~
|
|
!!! error TS2300: Duplicate identifier 'item'.
|
|
}
|
|
|
|
interface I3 {
|
|
prototype:number;
|
|
}
|
|
|
|
interface I4 {
|
|
class:number;
|
|
number:number;
|
|
super:number;
|
|
prototype:number;
|
|
}
|
|
|
|
interface I5 extends I5 {
|
|
~~
|
|
!!! error TS2310: Type 'I5' recursively references itself as a base type.
|
|
foo():void;
|
|
}
|
|
|
|
interface I6 {
|
|
():void;
|
|
}
|
|
|
|
interface I7 extends I6 { }
|
|
|
|
var v1:I7;
|
|
v1();
|
|
|
|
class C1 implements I3 {
|
|
~~
|
|
!!! error TS2420: Class 'C1' incorrectly implements interface 'I3'.
|
|
!!! error TS2420: Property 'prototype' is missing in type 'C1'.
|
|
constructor() {
|
|
var prototype: number = 3;
|
|
}
|
|
}
|
|
|
|
interface i8 extends i9 { }
|
|
~~
|
|
!!! error TS2310: Type 'i8' recursively references itself as a base type.
|
|
interface i9 extends i8 { }
|
|
|
|
interface i10 {
|
|
foo():number;
|
|
}
|
|
|
|
interface i11{
|
|
foo():string;
|
|
}
|
|
|
|
interface i12 extends i10, i11 { }
|
|
~~~
|
|
!!! error TS2320: Interface 'i12' cannot simultaneously extend types 'i10' and 'i11'.
|
|
!!! error TS2320: Named property 'foo' of types 'i10' and 'i11' are not identical.
|
|
|