File: interfaceDeclaration1.errors.txt

package info (click to toggle)
node-typescript 2.1.5-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 203,952 kB
  • ctags: 52,987
  • sloc: sh: 11; makefile: 5
file content (87 lines) | stat: -rw-r--r-- 3,075 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
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(8,5): error TS2403: Subsequent variable declarations must have the same type.  Variable 'item' must be of type 'any', but here has type 'number'.
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 (9 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'.
        ~~~~
!!! error TS2403: Subsequent variable declarations must have the same type.  Variable 'item' must be of type 'any', but here has type 'number'.
    }
    
    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.