forked from babel/babel
/
output.json
220 lines (220 loc) 路 9.49 KB
/
output.json
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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
{
"type": "File",
"start":0,"end":239,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":15,"column":1,"index":239}},
"errors": [
"SyntaxError: An 'accessor' property cannot be declared optional. (7:2)"
],
"program": {
"type": "Program",
"start":0,"end":239,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":15,"column":1,"index":239}},
"sourceType": "module",
"interpreter": null,
"body": [
{
"type": "ClassDeclaration",
"start":0,"end":190,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":10,"column":1,"index":190}},
"abstract": true,
"id": {
"type": "Identifier",
"start":15,"end":18,"loc":{"start":{"line":1,"column":15,"index":15},"end":{"line":1,"column":18,"index":18},"identifierName":"Foo"},
"name": "Foo"
},
"superClass": null,
"body": {
"type": "ClassBody",
"start":19,"end":190,"loc":{"start":{"line":1,"column":19,"index":19},"end":{"line":10,"column":1,"index":190}},
"body": [
{
"type": "ClassAccessorProperty",
"start":23,"end":54,"loc":{"start":{"line":2,"column":2,"index":23},"end":{"line":2,"column":33,"index":54}},
"declare": true,
"static": false,
"key": {
"type": "Identifier",
"start":40,"end":45,"loc":{"start":{"line":2,"column":19,"index":40},"end":{"line":2,"column":24,"index":45},"identifierName":"prop7"},
"name": "prop7"
},
"computed": false,
"typeAnnotation": {
"type": "TSTypeAnnotation",
"start":45,"end":53,"loc":{"start":{"line":2,"column":24,"index":45},"end":{"line":2,"column":32,"index":53}},
"typeAnnotation": {
"type": "TSNumberKeyword",
"start":47,"end":53,"loc":{"start":{"line":2,"column":26,"index":47},"end":{"line":2,"column":32,"index":53}}
}
},
"value": null
},
{
"type": "ClassAccessorProperty",
"start":57,"end":82,"loc":{"start":{"line":3,"column":2,"index":57},"end":{"line":3,"column":27,"index":82}},
"accessibility": "private",
"static": false,
"key": {
"type": "PrivateName",
"start":74,"end":76,"loc":{"start":{"line":3,"column":19,"index":74},"end":{"line":3,"column":21,"index":76}},
"id": {
"type": "Identifier",
"start":75,"end":76,"loc":{"start":{"line":3,"column":20,"index":75},"end":{"line":3,"column":21,"index":76},"identifierName":"p"},
"name": "p"
}
},
"computed": false,
"typeAnnotation": {
"type": "TSTypeAnnotation",
"start":76,"end":81,"loc":{"start":{"line":3,"column":21,"index":76},"end":{"line":3,"column":26,"index":81}},
"typeAnnotation": {
"type": "TSAnyKeyword",
"start":78,"end":81,"loc":{"start":{"line":3,"column":23,"index":78},"end":{"line":3,"column":26,"index":81}}
}
},
"value": null
},
{
"type": "ClassAccessorProperty",
"start":86,"end":98,"loc":{"start":{"line":5,"column":2,"index":86},"end":{"line":5,"column":14,"index":98}},
"static": false,
"key": {
"type": "Identifier",
"start":95,"end":96,"loc":{"start":{"line":5,"column":11,"index":95},"end":{"line":5,"column":12,"index":96},"identifierName":"a"},
"name": "a"
},
"computed": false,
"definite": true,
"value": null
},
{
"type": "ClassAccessorProperty",
"start":101,"end":122,"loc":{"start":{"line":6,"column":2,"index":101},"end":{"line":6,"column":23,"index":122}},
"abstract": true,
"static": false,
"key": {
"type": "PrivateName",
"start":119,"end":121,"loc":{"start":{"line":6,"column":20,"index":119},"end":{"line":6,"column":22,"index":121}},
"id": {
"type": "Identifier",
"start":120,"end":121,"loc":{"start":{"line":6,"column":21,"index":120},"end":{"line":6,"column":22,"index":121},"identifierName":"s"},
"name": "s"
}
},
"computed": false,
"value": null
},
{
"type": "ClassAccessorProperty",
"start":125,"end":138,"loc":{"start":{"line":7,"column":2,"index":125},"end":{"line":7,"column":15,"index":138}},
"static": false,
"key": {
"type": "PrivateName",
"start":134,"end":136,"loc":{"start":{"line":7,"column":11,"index":134},"end":{"line":7,"column":13,"index":136}},
"id": {
"type": "Identifier",
"start":135,"end":136,"loc":{"start":{"line":7,"column":12,"index":135},"end":{"line":7,"column":13,"index":136},"identifierName":"d"},
"name": "d"
}
},
"computed": false,
"optional": true,
"value": null
},
{
"type": "ClassAccessorProperty",
"start":141,"end":165,"loc":{"start":{"line":8,"column":2,"index":141},"end":{"line":8,"column":26,"index":165}},
"abstract": true,
"static": false,
"key": {
"type": "Identifier",
"start":159,"end":160,"loc":{"start":{"line":8,"column":20,"index":159},"end":{"line":8,"column":21,"index":160},"identifierName":"f"},
"name": "f"
},
"computed": false,
"value": {
"type": "NumericLiteral",
"start":163,"end":164,"loc":{"start":{"line":8,"column":24,"index":163},"end":{"line":8,"column":25,"index":164}},
"extra": {
"rawValue": 1,
"raw": "1"
},
"value": 1
}
},
{
"type": "ClassAccessorProperty",
"start":168,"end":188,"loc":{"start":{"line":9,"column":2,"index":168},"end":{"line":9,"column":22,"index":188}},
"readonly": true,
"static": false,
"key": {
"type": "Identifier",
"start":186,"end":187,"loc":{"start":{"line":9,"column":20,"index":186},"end":{"line":9,"column":21,"index":187},"identifierName":"g"},
"name": "g"
},
"computed": false,
"value": null
}
]
}
},
{
"type": "ClassDeclaration",
"start":192,"end":239,"loc":{"start":{"line":12,"column":0,"index":192},"end":{"line":15,"column":1,"index":239}},
"declare": true,
"id": {
"type": "Identifier",
"start":206,"end":207,"loc":{"start":{"line":12,"column":14,"index":206},"end":{"line":12,"column":15,"index":207},"identifierName":"C"},
"name": "C"
},
"superClass": null,
"body": {
"type": "ClassBody",
"start":208,"end":239,"loc":{"start":{"line":12,"column":16,"index":208},"end":{"line":15,"column":1,"index":239}},
"body": [
{
"type": "ClassAccessorProperty",
"start":212,"end":227,"loc":{"start":{"line":13,"column":2,"index":212},"end":{"line":13,"column":17,"index":227}},
"static": false,
"key": {
"type": "Identifier",
"start":221,"end":222,"loc":{"start":{"line":13,"column":11,"index":221},"end":{"line":13,"column":12,"index":222},"identifierName":"x"},
"name": "x"
},
"computed": false,
"value": {
"type": "NumericLiteral",
"start":225,"end":226,"loc":{"start":{"line":13,"column":15,"index":225},"end":{"line":13,"column":16,"index":226}},
"extra": {
"rawValue": 1,
"raw": "1"
},
"value": 1
}
},
{
"type": "ClassPrivateProperty",
"start":230,"end":237,"loc":{"start":{"line":14,"column":2,"index":230},"end":{"line":14,"column":9,"index":237}},
"static": false,
"key": {
"type": "PrivateName",
"start":230,"end":232,"loc":{"start":{"line":14,"column":2,"index":230},"end":{"line":14,"column":4,"index":232}},
"id": {
"type": "Identifier",
"start":231,"end":232,"loc":{"start":{"line":14,"column":3,"index":231},"end":{"line":14,"column":4,"index":232},"identifierName":"y"},
"name": "y"
}
},
"value": {
"type": "NumericLiteral",
"start":235,"end":236,"loc":{"start":{"line":14,"column":7,"index":235},"end":{"line":14,"column":8,"index":236}},
"extra": {
"rawValue": 1,
"raw": "1"
},
"value": 1
}
}
]
}
}
],
"directives": []
}
}