File: destructuringParameterProperties4.types

package info (click to toggle)
node-typescript 4.9.5%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 533,908 kB
  • sloc: javascript: 2,018,330; makefile: 7; sh: 1
file content (93 lines) | stat: -rw-r--r-- 1,851 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
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
88
89
90
91
92
93
=== tests/cases/conformance/es6/destructuring/destructuringParameterProperties4.ts ===
class C1<T, U, V> {
>C1 : C1<T, U, V>

    constructor(private k: T, protected [a, b, c]: [T,U,V]) {
>k : T
>a : T
>b : U
>c : V

        if ((b === undefined && c === undefined) || (this.b === undefined && this.c === undefined)) {
>(b === undefined && c === undefined) || (this.b === undefined && this.c === undefined) : boolean
>(b === undefined && c === undefined) : boolean
>b === undefined && c === undefined : boolean
>b === undefined : boolean
>b : U
>undefined : undefined
>c === undefined : boolean
>c : V
>undefined : undefined
>(this.b === undefined && this.c === undefined) : boolean
>this.b === undefined && this.c === undefined : boolean
>this.b === undefined : boolean
>this.b : any
>this : this
>b : any
>undefined : undefined
>this.c === undefined : boolean
>this.c : any
>this : this
>c : any
>undefined : undefined

            this.a = a || k;
>this.a = a || k : T
>this.a : any
>this : this
>a : any
>a || k : T
>a : T
>k : T
        }
    }

    public getA() {
>getA : () => any

        return this.a
>this.a : any
>this : this
>a : any
    }

    public getB() {
>getB : () => any

        return this.b
>this.b : any
>this : this
>b : any
    }

    public getC() {
>getC : () => any

        return this.c;
>this.c : any
>this : this
>c : any
    }
}

class C2 extends C1<number, string, boolean> {
>C2 : C2
>C1 : C1<number, string, boolean>

    public doSomethingWithSuperProperties() {
>doSomethingWithSuperProperties : () => string

        return `${this.a} ${this.b} ${this.c}`;
>`${this.a} ${this.b} ${this.c}` : string
>this.a : any
>this : this
>a : any
>this.b : any
>this : this
>b : any
>this.c : any
>this : this
>c : any
    }
}