File: typeOfThisInStaticMembers11%28target%3Des6%29.js

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 (176 lines) | stat: -rw-r--r-- 3,953 bytes parent folder | download | duplicates (3)
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
//// [typeOfThisInStaticMembers11.ts]
declare const foo: any;

@foo
class C {
    static a = 1;
    static b = this.a + 1;
}

@foo
class D extends C {
    static c = 2;
    static d = this.c + 1;
    static e = super.a + this.c + 1;
    static f = () => this.c + 1;
    static ff = function () { this.c + 1 }
    static foo () {
        return this.c + 1;
    }
    static get fa () {
        return this.c + 1;
    }
    static set fa (v: number) {
        this.c = v + 1;
    }
}

class CC {
    static a = 1;
    static b = this.a + 1;
}

class DD extends CC {
    static c = 2;
    static d = this.c + 1;
    static e = super.a + this.c + 1;
    static f = () => this.c + 1;
    static ff = function () { this.c + 1 }
    static foo () {
        return this.c + 1;
    }
    static get fa () {
        return this.c + 1;
    }
    static set fa (v: number) {
        this.c = v + 1;
    }
}


//// [typeOfThisInStaticMembers11.js]
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var _a, _b, _c;
let C = class C {
};
Object.defineProperty(C, "a", {
    enumerable: true,
    configurable: true,
    writable: true,
    value: 1
});
Object.defineProperty(C, "b", {
    enumerable: true,
    configurable: true,
    writable: true,
    value: (void 0).a + 1
});
C = __decorate([
    foo
], C);
let D = class D extends C {
    static foo() {
        return this.c + 1;
    }
    static get fa() {
        return this.c + 1;
    }
    static set fa(v) {
        this.c = v + 1;
    }
};
Object.defineProperty(D, "c", {
    enumerable: true,
    configurable: true,
    writable: true,
    value: 2
});
Object.defineProperty(D, "d", {
    enumerable: true,
    configurable: true,
    writable: true,
    value: (void 0).c + 1
});
Object.defineProperty(D, "e", {
    enumerable: true,
    configurable: true,
    writable: true,
    value: (void 0).a + (void 0).c + 1
});
Object.defineProperty(D, "f", {
    enumerable: true,
    configurable: true,
    writable: true,
    value: () => (void 0).c + 1
});
Object.defineProperty(D, "ff", {
    enumerable: true,
    configurable: true,
    writable: true,
    value: function () { this.c + 1; }
});
D = __decorate([
    foo
], D);
class CC {
}
_a = CC;
Object.defineProperty(CC, "a", {
    enumerable: true,
    configurable: true,
    writable: true,
    value: 1
});
Object.defineProperty(CC, "b", {
    enumerable: true,
    configurable: true,
    writable: true,
    value: _a.a + 1
});
class DD extends (_c = CC) {
    static foo() {
        return this.c + 1;
    }
    static get fa() {
        return this.c + 1;
    }
    static set fa(v) {
        this.c = v + 1;
    }
}
_b = DD;
Object.defineProperty(DD, "c", {
    enumerable: true,
    configurable: true,
    writable: true,
    value: 2
});
Object.defineProperty(DD, "d", {
    enumerable: true,
    configurable: true,
    writable: true,
    value: _b.c + 1
});
Object.defineProperty(DD, "e", {
    enumerable: true,
    configurable: true,
    writable: true,
    value: Reflect.get(_c, "a", _b) + _b.c + 1
});
Object.defineProperty(DD, "f", {
    enumerable: true,
    configurable: true,
    writable: true,
    value: () => _b.c + 1
});
Object.defineProperty(DD, "ff", {
    enumerable: true,
    configurable: true,
    writable: true,
    value: function () { this.c + 1; }
});