File: bases.errors.txt

package info (click to toggle)
node-typescript 3.3.3333-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 324,548 kB
  • sloc: makefile: 6; sh: 3
file content (61 lines) | stat: -rw-r--r-- 2,644 bytes parent folder | download | duplicates (5)
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
tests/cases/compiler/bases.ts(7,14): error TS2339: Property 'y' does not exist on type 'B'.
tests/cases/compiler/bases.ts(7,15): error TS1005: ';' expected.
tests/cases/compiler/bases.ts(7,17): error TS2693: 'any' only refers to a type, but is being used as a value here.
tests/cases/compiler/bases.ts(11,7): error TS2420: Class 'C' incorrectly implements interface 'I'.
  Property 'x' is missing in type 'C' but required in type 'I'.
tests/cases/compiler/bases.ts(12,5): error TS2377: Constructors for derived classes must contain a 'super' call.
tests/cases/compiler/bases.ts(13,9): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
tests/cases/compiler/bases.ts(13,14): error TS2339: Property 'x' does not exist on type 'C'.
tests/cases/compiler/bases.ts(13,15): error TS1005: ';' expected.
tests/cases/compiler/bases.ts(13,17): error TS2693: 'any' only refers to a type, but is being used as a value here.
tests/cases/compiler/bases.ts(17,9): error TS2339: Property 'x' does not exist on type 'C'.
tests/cases/compiler/bases.ts(18,9): error TS2339: Property 'y' does not exist on type 'C'.


==== tests/cases/compiler/bases.ts (11 errors) ====
    interface I {
        x;
    }
    
    class B {
        constructor() {
            this.y: any;
                 ~
!!! error TS2339: Property 'y' does not exist on type 'B'.
                  ~
!!! error TS1005: ';' expected.
                    ~~~
!!! error TS2693: 'any' only refers to a type, but is being used as a value here.
        }
    }
    
    class C extends B implements I {
          ~
!!! error TS2420: Class 'C' incorrectly implements interface 'I'.
!!! error TS2420:   Property 'x' is missing in type 'C' but required in type 'I'.
!!! related TS2728 tests/cases/compiler/bases.ts:2:5: 'x' is declared here.
        constructor() {
        ~~~~~~~~~~~~~~~
            this.x: any;
    ~~~~~~~~~~~~~~~~~~~~
            ~~~~
!!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class.
                 ~
!!! error TS2339: Property 'x' does not exist on type 'C'.
                  ~
!!! error TS1005: ';' expected.
                    ~~~
!!! error TS2693: 'any' only refers to a type, but is being used as a value here.
        }
    ~~~~~
!!! error TS2377: Constructors for derived classes must contain a 'super' call.
    }
    
    new C().x;
            ~
!!! error TS2339: Property 'x' does not exist on type 'C'.
    new C().y;
            ~
!!! error TS2339: Property 'y' does not exist on type 'C'.