File: defineProperty%28target%3Desnext%29.errors.txt

package info (click to toggle)
node-typescript 5.0.4%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 459,140 kB
  • sloc: javascript: 1,972,754; makefile: 6; sh: 1
file content (43 lines) | stat: -rw-r--r-- 2,032 bytes parent folder | download | duplicates (4)
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
tests/cases/conformance/classes/propertyMemberDeclarations/defineProperty.ts(3,14): error TS2729: Property 'y' is used before its initialization.
tests/cases/conformance/classes/propertyMemberDeclarations/defineProperty.ts(10,14): error TS2729: Property 'y' is used before its initialization.
tests/cases/conformance/classes/propertyMemberDeclarations/defineProperty.ts(18,14): error TS2729: Property 'ka' is used before its initialization.
tests/cases/conformance/classes/propertyMemberDeclarations/defineProperty.ts(22,15): error TS2729: Property 'ka' is used before its initialization.


==== tests/cases/conformance/classes/propertyMemberDeclarations/defineProperty.ts (4 errors) ====
    var x: "p" = "p"
    class A {
        a = this.y
                 ~
!!! error TS2729: Property 'y' is used before its initialization.
!!! related TS2728 tests/cases/conformance/classes/propertyMemberDeclarations/defineProperty.ts:9:17: 'y' is declared here.
        b
        public c;
        ["computed"] = 13
        ;[x] = 14
        m() { }
        constructor(public readonly y: number) { }
        z = this.y
                 ~
!!! error TS2729: Property 'y' is used before its initialization.
!!! related TS2728 tests/cases/conformance/classes/propertyMemberDeclarations/defineProperty.ts:9:17: 'y' is declared here.
        declare notEmitted;
    }
    class B {
        public a;
    }
    class C extends B {
        declare public a;
        z = this.ka
                 ~~
!!! error TS2729: Property 'ka' is used before its initialization.
!!! related TS2728 tests/cases/conformance/classes/propertyMemberDeclarations/defineProperty.ts:19:17: 'ka' is declared here.
        constructor(public ka: number) {
            super()
        }
        ki = this.ka
                  ~~
!!! error TS2729: Property 'ka' is used before its initialization.
!!! related TS2728 tests/cases/conformance/classes/propertyMemberDeclarations/defineProperty.ts:19:17: 'ka' is declared here.
    }