hermes-transform 0.6.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ESLINT_LICENCE +19 -0
- package/PRETTIER_LICENCE +7 -0
- package/dist/detachedNode.js +96 -20
- package/dist/detachedNode.js.flow +105 -17
- package/dist/generated/TransformCloneSignatures.js.flow +33 -66
- package/dist/generated/TransformModifySignatures.js.flow +1113 -0
- package/dist/generated/TransformReplaceSignatures.js.flow +19 -40
- package/dist/generated/node-types.js +638 -905
- package/dist/generated/node-types.js.flow +998 -1256
- package/dist/generated/special-case-node-types.js +71 -77
- package/dist/generated/special-case-node-types.js.flow +104 -88
- package/dist/index.js.flow +2 -1
- package/dist/transform/MutationContext.js +2 -2
- package/dist/transform/MutationContext.js.flow +3 -2
- package/dist/transform/TransformContext.js +56 -43
- package/dist/transform/TransformContext.js.flow +154 -95
- package/dist/transform/comments/comments.js +133 -28
- package/dist/transform/comments/comments.js.flow +125 -28
- package/dist/transform/getTransformedAST.js +20 -12
- package/dist/transform/getTransformedAST.js.flow +32 -14
- package/dist/transform/mutations/{AddLeadingComments.js → AddComments.js} +11 -8
- package/dist/transform/mutations/AddComments.js.flow +50 -0
- package/dist/transform/mutations/CloneCommentsTo.js +1 -2
- package/dist/transform/mutations/CloneCommentsTo.js.flow +1 -2
- package/dist/transform/mutations/InsertStatement.js +3 -1
- package/dist/transform/mutations/InsertStatement.js.flow +7 -1
- package/dist/transform/mutations/RemoveNode.js +10 -3
- package/dist/transform/mutations/RemoveNode.js.flow +14 -3
- package/dist/transform/mutations/ReplaceNode.js +7 -2
- package/dist/transform/mutations/ReplaceNode.js.flow +5 -2
- package/dist/transform/mutations/ReplaceStatementWithMany.js.flow +5 -2
- package/dist/transform/mutations/utils/arrayUtils.js +14 -0
- package/dist/transform/mutations/utils/arrayUtils.js.flow +15 -0
- package/dist/transform/transform.js +38 -6
- package/dist/transform/transform.js.flow +40 -6
- package/dist/traverse/NodeEventGenerator.js.flow +1 -1
- package/dist/traverse/traverse.js +27 -3
- package/dist/traverse/traverse.js.flow +63 -10
- package/package.json +9 -4
- package/dist/transform/mutations/AddLeadingComments.js.flow +0 -49
- package/dist/transform/mutations/AddTrailingComments.js +0 -40
- package/dist/transform/mutations/AddTrailingComments.js.flow +0 -49
|
@@ -31,12 +31,10 @@ import type {
|
|
|
31
31
|
BreakStatement as BreakStatementType,
|
|
32
32
|
CallExpression as CallExpressionType,
|
|
33
33
|
CatchClause as CatchClauseType,
|
|
34
|
+
ChainExpression as ChainExpressionType,
|
|
34
35
|
ClassBody as ClassBodyType,
|
|
35
|
-
ClassDeclaration as ClassDeclarationType,
|
|
36
36
|
ClassExpression as ClassExpressionType,
|
|
37
37
|
ClassImplements as ClassImplementsType,
|
|
38
|
-
ClassPrivateProperty as ClassPrivatePropertyType,
|
|
39
|
-
ClassProperty as ClassPropertyType,
|
|
40
38
|
ConditionalExpression as ConditionalExpressionType,
|
|
41
39
|
ContinueStatement as ContinueStatementType,
|
|
42
40
|
DebuggerStatement as DebuggerStatementType,
|
|
@@ -67,7 +65,6 @@ import type {
|
|
|
67
65
|
ExportAllDeclaration as ExportAllDeclarationType,
|
|
68
66
|
ExportDefaultDeclaration as ExportDefaultDeclarationType,
|
|
69
67
|
ExportNamedDeclaration as ExportNamedDeclarationType,
|
|
70
|
-
ExportNamespaceSpecifier as ExportNamespaceSpecifierType,
|
|
71
68
|
ExportSpecifier as ExportSpecifierType,
|
|
72
69
|
ExpressionStatement as ExpressionStatementType,
|
|
73
70
|
ForInStatement as ForInStatementType,
|
|
@@ -126,11 +123,10 @@ import type {
|
|
|
126
123
|
ObjectTypeProperty as ObjectTypePropertyType,
|
|
127
124
|
ObjectTypeSpreadProperty as ObjectTypeSpreadPropertyType,
|
|
128
125
|
OpaqueType as OpaqueTypeType,
|
|
129
|
-
OptionalCallExpression as OptionalCallExpressionType,
|
|
130
126
|
OptionalIndexedAccessType as OptionalIndexedAccessTypeType,
|
|
131
|
-
|
|
132
|
-
PrivateName as PrivateNameType,
|
|
127
|
+
PrivateIdentifier as PrivateIdentifierType,
|
|
133
128
|
Property as PropertyType,
|
|
129
|
+
PropertyDefinition as PropertyDefinitionType,
|
|
134
130
|
QualifiedTypeIdentifier as QualifiedTypeIdentifierType,
|
|
135
131
|
RestElement as RestElementType,
|
|
136
132
|
ReturnStatement as ReturnStatementType,
|
|
@@ -167,9 +163,10 @@ import type {
|
|
|
167
163
|
WithStatement as WithStatementType,
|
|
168
164
|
YieldExpression as YieldExpressionType,
|
|
169
165
|
} from 'hermes-estree';
|
|
170
|
-
import type {DetachedNode} from '../detachedNode';
|
|
166
|
+
import type {DetachedNode, MaybeDetachedNode} from '../detachedNode';
|
|
171
167
|
|
|
172
168
|
import {
|
|
169
|
+
asDetachedNode,
|
|
173
170
|
detachedProps,
|
|
174
171
|
setParentPointersInDirectChildren,
|
|
175
172
|
} from '../detachedNode';
|
|
@@ -178,33 +175,35 @@ export type AnyTypeAnnotationProps = {};
|
|
|
178
175
|
|
|
179
176
|
export type ArrayExpressionProps = {
|
|
180
177
|
+elements: $ReadOnlyArray<
|
|
181
|
-
|
|
178
|
+
MaybeDetachedNode<ArrayExpressionType['elements'][number]>,
|
|
182
179
|
>,
|
|
183
180
|
+trailingComma: ArrayExpressionType['trailingComma'],
|
|
184
181
|
};
|
|
185
182
|
|
|
186
183
|
export type ArrayPatternProps = {
|
|
187
|
-
+elements: $ReadOnlyArray<
|
|
188
|
-
|
|
184
|
+
+elements: $ReadOnlyArray<
|
|
185
|
+
MaybeDetachedNode<ArrayPatternType['elements'][number]>,
|
|
186
|
+
>,
|
|
187
|
+
+typeAnnotation?: ?MaybeDetachedNode<ArrayPatternType['typeAnnotation']>,
|
|
189
188
|
};
|
|
190
189
|
|
|
191
190
|
export type ArrayTypeAnnotationProps = {
|
|
192
|
-
+elementType:
|
|
191
|
+
+elementType: MaybeDetachedNode<ArrayTypeAnnotationType['elementType']>,
|
|
193
192
|
};
|
|
194
193
|
|
|
195
194
|
export type AssignmentExpressionProps = {
|
|
196
195
|
+operator: AssignmentExpressionType['operator'],
|
|
197
|
-
+left:
|
|
198
|
-
+right:
|
|
196
|
+
+left: MaybeDetachedNode<AssignmentExpressionType['left']>,
|
|
197
|
+
+right: MaybeDetachedNode<AssignmentExpressionType['right']>,
|
|
199
198
|
};
|
|
200
199
|
|
|
201
200
|
export type AssignmentPatternProps = {
|
|
202
|
-
+left:
|
|
203
|
-
+right:
|
|
201
|
+
+left: MaybeDetachedNode<AssignmentPatternType['left']>,
|
|
202
|
+
+right: MaybeDetachedNode<AssignmentPatternType['right']>,
|
|
204
203
|
};
|
|
205
204
|
|
|
206
205
|
export type AwaitExpressionProps = {
|
|
207
|
-
+argument:
|
|
206
|
+
+argument: MaybeDetachedNode<AwaitExpressionType['argument']>,
|
|
208
207
|
};
|
|
209
208
|
|
|
210
209
|
export type BigIntLiteralTypeAnnotationProps = {
|
|
@@ -212,13 +211,13 @@ export type BigIntLiteralTypeAnnotationProps = {
|
|
|
212
211
|
};
|
|
213
212
|
|
|
214
213
|
export type BinaryExpressionProps = {
|
|
215
|
-
+left:
|
|
216
|
-
+right:
|
|
214
|
+
+left: MaybeDetachedNode<BinaryExpressionType['left']>,
|
|
215
|
+
+right: MaybeDetachedNode<BinaryExpressionType['right']>,
|
|
217
216
|
+operator: BinaryExpressionType['operator'],
|
|
218
217
|
};
|
|
219
218
|
|
|
220
219
|
export type BlockStatementProps = {
|
|
221
|
-
+body: $ReadOnlyArray<
|
|
220
|
+
+body: $ReadOnlyArray<MaybeDetachedNode<BlockStatementType['body'][number]>>,
|
|
222
221
|
};
|
|
223
222
|
|
|
224
223
|
export type BooleanLiteralTypeAnnotationProps = {
|
|
@@ -229,168 +228,143 @@ export type BooleanLiteralTypeAnnotationProps = {
|
|
|
229
228
|
export type BooleanTypeAnnotationProps = {};
|
|
230
229
|
|
|
231
230
|
export type BreakStatementProps = {
|
|
232
|
-
+label?: ?
|
|
231
|
+
+label?: ?MaybeDetachedNode<BreakStatementType['label']>,
|
|
233
232
|
};
|
|
234
233
|
|
|
235
234
|
export type CallExpressionProps = {
|
|
236
|
-
+callee:
|
|
237
|
-
+typeArguments?: ?
|
|
235
|
+
+callee: MaybeDetachedNode<CallExpressionType['callee']>,
|
|
236
|
+
+typeArguments?: ?MaybeDetachedNode<CallExpressionType['typeArguments']>,
|
|
238
237
|
+arguments: $ReadOnlyArray<
|
|
239
|
-
|
|
238
|
+
MaybeDetachedNode<CallExpressionType['arguments'][number]>,
|
|
240
239
|
>,
|
|
241
240
|
};
|
|
242
241
|
|
|
243
242
|
export type CatchClauseProps = {
|
|
244
|
-
+param?: ?
|
|
245
|
-
+body:
|
|
243
|
+
+param?: ?MaybeDetachedNode<CatchClauseType['param']>,
|
|
244
|
+
+body: MaybeDetachedNode<CatchClauseType['body']>,
|
|
246
245
|
};
|
|
247
246
|
|
|
248
|
-
export type
|
|
249
|
-
+
|
|
247
|
+
export type ChainExpressionProps = {
|
|
248
|
+
+expression: MaybeDetachedNode<ChainExpressionType['expression']>,
|
|
250
249
|
};
|
|
251
250
|
|
|
252
|
-
export type
|
|
253
|
-
+
|
|
254
|
-
+typeParameters?: ?DetachedNode<ClassDeclarationType['typeParameters']>,
|
|
255
|
-
+superClass?: ?DetachedNode<ClassDeclarationType['superClass']>,
|
|
256
|
-
+superTypeParameters?: ?DetachedNode<
|
|
257
|
-
ClassDeclarationType['superTypeParameters'],
|
|
258
|
-
>,
|
|
259
|
-
+implements: $ReadOnlyArray<
|
|
260
|
-
DetachedNode<ClassDeclarationType['implements'][number]>,
|
|
261
|
-
>,
|
|
262
|
-
+decorators: $ReadOnlyArray<
|
|
263
|
-
DetachedNode<ClassDeclarationType['decorators'][number]>,
|
|
264
|
-
>,
|
|
265
|
-
+body: DetachedNode<ClassDeclarationType['body']>,
|
|
251
|
+
export type ClassBodyProps = {
|
|
252
|
+
+body: $ReadOnlyArray<MaybeDetachedNode<ClassBodyType['body'][number]>>,
|
|
266
253
|
};
|
|
267
254
|
|
|
268
255
|
export type ClassExpressionProps = {
|
|
269
|
-
+id?: ?
|
|
270
|
-
+typeParameters?: ?
|
|
271
|
-
+superClass?: ?
|
|
272
|
-
+superTypeParameters?: ?
|
|
256
|
+
+id?: ?MaybeDetachedNode<ClassExpressionType['id']>,
|
|
257
|
+
+typeParameters?: ?MaybeDetachedNode<ClassExpressionType['typeParameters']>,
|
|
258
|
+
+superClass?: ?MaybeDetachedNode<ClassExpressionType['superClass']>,
|
|
259
|
+
+superTypeParameters?: ?MaybeDetachedNode<
|
|
273
260
|
ClassExpressionType['superTypeParameters'],
|
|
274
261
|
>,
|
|
275
262
|
+implements: $ReadOnlyArray<
|
|
276
|
-
|
|
263
|
+
MaybeDetachedNode<ClassExpressionType['implements'][number]>,
|
|
277
264
|
>,
|
|
278
265
|
+decorators: $ReadOnlyArray<
|
|
279
|
-
|
|
266
|
+
MaybeDetachedNode<ClassExpressionType['decorators'][number]>,
|
|
280
267
|
>,
|
|
281
|
-
+body:
|
|
268
|
+
+body: MaybeDetachedNode<ClassExpressionType['body']>,
|
|
282
269
|
};
|
|
283
270
|
|
|
284
271
|
export type ClassImplementsProps = {
|
|
285
|
-
+id:
|
|
286
|
-
+typeParameters?: ?
|
|
287
|
-
};
|
|
288
|
-
|
|
289
|
-
export type ClassPrivatePropertyProps = {
|
|
290
|
-
+key: DetachedNode<ClassPrivatePropertyType['key']>,
|
|
291
|
-
+value?: ?DetachedNode<ClassPrivatePropertyType['value']>,
|
|
292
|
-
+static: ClassPrivatePropertyType['static'],
|
|
293
|
-
+declare: ClassPrivatePropertyType['declare'],
|
|
294
|
-
+optional: ClassPrivatePropertyType['optional'],
|
|
295
|
-
+variance?: ?DetachedNode<ClassPrivatePropertyType['variance']>,
|
|
296
|
-
+typeAnnotation?: ?DetachedNode<ClassPrivatePropertyType['typeAnnotation']>,
|
|
297
|
-
};
|
|
298
|
-
|
|
299
|
-
export type ClassPropertyProps = {
|
|
300
|
-
+key: DetachedNode<ClassPropertyType['key']>,
|
|
301
|
-
+value?: ?DetachedNode<ClassPropertyType['value']>,
|
|
302
|
-
+computed: ClassPropertyType['computed'],
|
|
303
|
-
+static: ClassPropertyType['static'],
|
|
304
|
-
+declare: ClassPropertyType['declare'],
|
|
305
|
-
+optional: ClassPropertyType['optional'],
|
|
306
|
-
+variance?: ?DetachedNode<ClassPropertyType['variance']>,
|
|
307
|
-
+typeAnnotation?: ?DetachedNode<ClassPropertyType['typeAnnotation']>,
|
|
272
|
+
+id: MaybeDetachedNode<ClassImplementsType['id']>,
|
|
273
|
+
+typeParameters?: ?MaybeDetachedNode<ClassImplementsType['typeParameters']>,
|
|
308
274
|
};
|
|
309
275
|
|
|
310
276
|
export type ConditionalExpressionProps = {
|
|
311
|
-
+test:
|
|
312
|
-
+alternate:
|
|
313
|
-
+consequent:
|
|
277
|
+
+test: MaybeDetachedNode<ConditionalExpressionType['test']>,
|
|
278
|
+
+alternate: MaybeDetachedNode<ConditionalExpressionType['alternate']>,
|
|
279
|
+
+consequent: MaybeDetachedNode<ConditionalExpressionType['consequent']>,
|
|
314
280
|
};
|
|
315
281
|
|
|
316
282
|
export type ContinueStatementProps = {
|
|
317
|
-
+label?: ?
|
|
283
|
+
+label?: ?MaybeDetachedNode<ContinueStatementType['label']>,
|
|
318
284
|
};
|
|
319
285
|
|
|
320
286
|
export type DebuggerStatementProps = {};
|
|
321
287
|
|
|
322
288
|
export type DeclareClassProps = {
|
|
323
|
-
+id:
|
|
324
|
-
+typeParameters?: ?
|
|
325
|
-
+extends: $ReadOnlyArray<
|
|
289
|
+
+id: MaybeDetachedNode<DeclareClassType['id']>,
|
|
290
|
+
+typeParameters?: ?MaybeDetachedNode<DeclareClassType['typeParameters']>,
|
|
291
|
+
+extends: $ReadOnlyArray<
|
|
292
|
+
MaybeDetachedNode<DeclareClassType['extends'][number]>,
|
|
293
|
+
>,
|
|
326
294
|
+implements: $ReadOnlyArray<
|
|
327
|
-
|
|
295
|
+
MaybeDetachedNode<DeclareClassType['implements'][number]>,
|
|
328
296
|
>,
|
|
329
|
-
+mixins: $ReadOnlyArray<
|
|
330
|
-
|
|
297
|
+
+mixins: $ReadOnlyArray<
|
|
298
|
+
MaybeDetachedNode<DeclareClassType['mixins'][number]>,
|
|
299
|
+
>,
|
|
300
|
+
+body: MaybeDetachedNode<DeclareClassType['body']>,
|
|
331
301
|
};
|
|
332
302
|
|
|
333
303
|
export type DeclaredPredicateProps = {
|
|
334
|
-
+value:
|
|
304
|
+
+value: MaybeDetachedNode<DeclaredPredicateType['value']>,
|
|
335
305
|
};
|
|
336
306
|
|
|
337
307
|
export type DeclareExportAllDeclarationProps = {
|
|
338
|
-
+source:
|
|
308
|
+
+source: MaybeDetachedNode<DeclareExportAllDeclarationType['source']>,
|
|
339
309
|
};
|
|
340
310
|
|
|
341
311
|
export type DeclareExportDeclarationProps = {
|
|
342
|
-
+declaration?: ?
|
|
312
|
+
+declaration?: ?MaybeDetachedNode<
|
|
313
|
+
DeclareExportDeclarationType['declaration'],
|
|
314
|
+
>,
|
|
343
315
|
+specifiers: $ReadOnlyArray<
|
|
344
|
-
|
|
316
|
+
MaybeDetachedNode<DeclareExportDeclarationType['specifiers'][number]>,
|
|
345
317
|
>,
|
|
346
|
-
+source?: ?
|
|
318
|
+
+source?: ?MaybeDetachedNode<DeclareExportDeclarationType['source']>,
|
|
347
319
|
+default: DeclareExportDeclarationType['default'],
|
|
348
320
|
};
|
|
349
321
|
|
|
350
322
|
export type DeclareFunctionProps = {
|
|
351
|
-
+id:
|
|
352
|
-
+predicate?: ?
|
|
323
|
+
+id: MaybeDetachedNode<DeclareFunctionType['id']>,
|
|
324
|
+
+predicate?: ?MaybeDetachedNode<DeclareFunctionType['predicate']>,
|
|
353
325
|
};
|
|
354
326
|
|
|
355
327
|
export type DeclareInterfaceProps = {
|
|
356
|
-
+id:
|
|
357
|
-
+typeParameters?: ?
|
|
328
|
+
+id: MaybeDetachedNode<DeclareInterfaceType['id']>,
|
|
329
|
+
+typeParameters?: ?MaybeDetachedNode<DeclareInterfaceType['typeParameters']>,
|
|
358
330
|
+extends: $ReadOnlyArray<
|
|
359
|
-
|
|
331
|
+
MaybeDetachedNode<DeclareInterfaceType['extends'][number]>,
|
|
360
332
|
>,
|
|
361
|
-
+body:
|
|
333
|
+
+body: MaybeDetachedNode<DeclareInterfaceType['body']>,
|
|
362
334
|
};
|
|
363
335
|
|
|
364
336
|
export type DeclareModuleProps = {
|
|
365
|
-
+id:
|
|
366
|
-
+body:
|
|
337
|
+
+id: MaybeDetachedNode<DeclareModuleType['id']>,
|
|
338
|
+
+body: MaybeDetachedNode<DeclareModuleType['body']>,
|
|
367
339
|
+kind: DeclareModuleType['kind'],
|
|
368
340
|
};
|
|
369
341
|
|
|
370
342
|
export type DeclareModuleExportsProps = {
|
|
371
|
-
+typeAnnotation:
|
|
343
|
+
+typeAnnotation: MaybeDetachedNode<
|
|
344
|
+
DeclareModuleExportsType['typeAnnotation'],
|
|
345
|
+
>,
|
|
372
346
|
};
|
|
373
347
|
|
|
374
348
|
export type DeclareOpaqueTypeProps = {
|
|
375
|
-
+id:
|
|
376
|
-
+typeParameters?: ?
|
|
377
|
-
+impltype?: ?
|
|
378
|
-
+supertype?: ?
|
|
349
|
+
+id: MaybeDetachedNode<DeclareOpaqueTypeType['id']>,
|
|
350
|
+
+typeParameters?: ?MaybeDetachedNode<DeclareOpaqueTypeType['typeParameters']>,
|
|
351
|
+
+impltype?: ?MaybeDetachedNode<DeclareOpaqueTypeType['impltype']>,
|
|
352
|
+
+supertype?: ?MaybeDetachedNode<DeclareOpaqueTypeType['supertype']>,
|
|
379
353
|
};
|
|
380
354
|
|
|
381
355
|
export type DeclareTypeAliasProps = {
|
|
382
|
-
+id:
|
|
383
|
-
+typeParameters?: ?
|
|
384
|
-
+right:
|
|
356
|
+
+id: MaybeDetachedNode<DeclareTypeAliasType['id']>,
|
|
357
|
+
+typeParameters?: ?MaybeDetachedNode<DeclareTypeAliasType['typeParameters']>,
|
|
358
|
+
+right: MaybeDetachedNode<DeclareTypeAliasType['right']>,
|
|
385
359
|
};
|
|
386
360
|
|
|
387
361
|
export type DeclareVariableProps = {
|
|
388
|
-
+id:
|
|
362
|
+
+id: MaybeDetachedNode<DeclareVariableType['id']>,
|
|
389
363
|
};
|
|
390
364
|
|
|
391
365
|
export type DoWhileStatementProps = {
|
|
392
|
-
+body:
|
|
393
|
-
+test:
|
|
366
|
+
+body: MaybeDetachedNode<DoWhileStatementType['body']>,
|
|
367
|
+
+test: MaybeDetachedNode<DoWhileStatementType['test']>,
|
|
394
368
|
};
|
|
395
369
|
|
|
396
370
|
export type EmptyStatementProps = {};
|
|
@@ -399,256 +373,273 @@ export type EmptyTypeAnnotationProps = {};
|
|
|
399
373
|
|
|
400
374
|
export type EnumBooleanBodyProps = {
|
|
401
375
|
+members: $ReadOnlyArray<
|
|
402
|
-
|
|
376
|
+
MaybeDetachedNode<EnumBooleanBodyType['members'][number]>,
|
|
403
377
|
>,
|
|
404
378
|
+explicitType: EnumBooleanBodyType['explicitType'],
|
|
405
379
|
+hasUnknownMembers: EnumBooleanBodyType['hasUnknownMembers'],
|
|
406
380
|
};
|
|
407
381
|
|
|
408
382
|
export type EnumBooleanMemberProps = {
|
|
409
|
-
+id:
|
|
410
|
-
+init:
|
|
383
|
+
+id: MaybeDetachedNode<EnumBooleanMemberType['id']>,
|
|
384
|
+
+init: MaybeDetachedNode<EnumBooleanMemberType['init']>,
|
|
411
385
|
};
|
|
412
386
|
|
|
413
387
|
export type EnumDeclarationProps = {
|
|
414
|
-
+id:
|
|
415
|
-
+body:
|
|
388
|
+
+id: MaybeDetachedNode<EnumDeclarationType['id']>,
|
|
389
|
+
+body: MaybeDetachedNode<EnumDeclarationType['body']>,
|
|
416
390
|
};
|
|
417
391
|
|
|
418
392
|
export type EnumDefaultedMemberProps = {
|
|
419
|
-
+id:
|
|
393
|
+
+id: MaybeDetachedNode<EnumDefaultedMemberType['id']>,
|
|
420
394
|
};
|
|
421
395
|
|
|
422
396
|
export type EnumNumberBodyProps = {
|
|
423
|
-
+members: $ReadOnlyArray<
|
|
397
|
+
+members: $ReadOnlyArray<
|
|
398
|
+
MaybeDetachedNode<EnumNumberBodyType['members'][number]>,
|
|
399
|
+
>,
|
|
424
400
|
+explicitType: EnumNumberBodyType['explicitType'],
|
|
425
401
|
+hasUnknownMembers: EnumNumberBodyType['hasUnknownMembers'],
|
|
426
402
|
};
|
|
427
403
|
|
|
428
404
|
export type EnumNumberMemberProps = {
|
|
429
|
-
+id:
|
|
430
|
-
+init:
|
|
405
|
+
+id: MaybeDetachedNode<EnumNumberMemberType['id']>,
|
|
406
|
+
+init: MaybeDetachedNode<EnumNumberMemberType['init']>,
|
|
431
407
|
};
|
|
432
408
|
|
|
433
409
|
export type EnumStringBodyProps = {
|
|
434
|
-
+members: $ReadOnlyArray<
|
|
410
|
+
+members: $ReadOnlyArray<
|
|
411
|
+
MaybeDetachedNode<EnumStringBodyType['members'][number]>,
|
|
412
|
+
>,
|
|
435
413
|
+explicitType: EnumStringBodyType['explicitType'],
|
|
436
414
|
+hasUnknownMembers: EnumStringBodyType['hasUnknownMembers'],
|
|
437
415
|
};
|
|
438
416
|
|
|
439
417
|
export type EnumStringMemberProps = {
|
|
440
|
-
+id:
|
|
441
|
-
+init:
|
|
418
|
+
+id: MaybeDetachedNode<EnumStringMemberType['id']>,
|
|
419
|
+
+init: MaybeDetachedNode<EnumStringMemberType['init']>,
|
|
442
420
|
};
|
|
443
421
|
|
|
444
422
|
export type EnumSymbolBodyProps = {
|
|
445
|
-
+members: $ReadOnlyArray<
|
|
423
|
+
+members: $ReadOnlyArray<
|
|
424
|
+
MaybeDetachedNode<EnumSymbolBodyType['members'][number]>,
|
|
425
|
+
>,
|
|
446
426
|
+hasUnknownMembers: EnumSymbolBodyType['hasUnknownMembers'],
|
|
447
427
|
};
|
|
448
428
|
|
|
449
429
|
export type ExistsTypeAnnotationProps = {};
|
|
450
430
|
|
|
451
431
|
export type ExportAllDeclarationProps = {
|
|
452
|
-
+
|
|
432
|
+
+exported?: ?MaybeDetachedNode<ExportAllDeclarationType['exported']>,
|
|
433
|
+
+source: MaybeDetachedNode<ExportAllDeclarationType['source']>,
|
|
453
434
|
+exportKind: ExportAllDeclarationType['exportKind'],
|
|
454
435
|
};
|
|
455
436
|
|
|
456
437
|
export type ExportDefaultDeclarationProps = {
|
|
457
|
-
+declaration:
|
|
438
|
+
+declaration: MaybeDetachedNode<ExportDefaultDeclarationType['declaration']>,
|
|
458
439
|
};
|
|
459
440
|
|
|
460
441
|
export type ExportNamedDeclarationProps = {
|
|
461
|
-
+declaration?: ?
|
|
442
|
+
+declaration?: ?MaybeDetachedNode<ExportNamedDeclarationType['declaration']>,
|
|
462
443
|
+specifiers: $ReadOnlyArray<
|
|
463
|
-
|
|
444
|
+
MaybeDetachedNode<ExportNamedDeclarationType['specifiers'][number]>,
|
|
464
445
|
>,
|
|
465
|
-
+source?: ?
|
|
446
|
+
+source?: ?MaybeDetachedNode<ExportNamedDeclarationType['source']>,
|
|
466
447
|
+exportKind: ExportNamedDeclarationType['exportKind'],
|
|
467
448
|
};
|
|
468
449
|
|
|
469
|
-
export type ExportNamespaceSpecifierProps = {
|
|
470
|
-
+exported: DetachedNode<ExportNamespaceSpecifierType['exported']>,
|
|
471
|
-
};
|
|
472
|
-
|
|
473
450
|
export type ExportSpecifierProps = {
|
|
474
|
-
+exported:
|
|
475
|
-
+local:
|
|
451
|
+
+exported: MaybeDetachedNode<ExportSpecifierType['exported']>,
|
|
452
|
+
+local: MaybeDetachedNode<ExportSpecifierType['local']>,
|
|
476
453
|
};
|
|
477
454
|
|
|
478
455
|
export type ExpressionStatementProps = {
|
|
479
|
-
+expression:
|
|
456
|
+
+expression: MaybeDetachedNode<ExpressionStatementType['expression']>,
|
|
480
457
|
+directive?: ?ExpressionStatementType['directive'],
|
|
481
458
|
};
|
|
482
459
|
|
|
483
460
|
export type ForInStatementProps = {
|
|
484
|
-
+left:
|
|
485
|
-
+right:
|
|
486
|
-
+body:
|
|
461
|
+
+left: MaybeDetachedNode<ForInStatementType['left']>,
|
|
462
|
+
+right: MaybeDetachedNode<ForInStatementType['right']>,
|
|
463
|
+
+body: MaybeDetachedNode<ForInStatementType['body']>,
|
|
487
464
|
};
|
|
488
465
|
|
|
489
466
|
export type ForOfStatementProps = {
|
|
490
|
-
+left:
|
|
491
|
-
+right:
|
|
492
|
-
+body:
|
|
467
|
+
+left: MaybeDetachedNode<ForOfStatementType['left']>,
|
|
468
|
+
+right: MaybeDetachedNode<ForOfStatementType['right']>,
|
|
469
|
+
+body: MaybeDetachedNode<ForOfStatementType['body']>,
|
|
493
470
|
+await: ForOfStatementType['await'],
|
|
494
471
|
};
|
|
495
472
|
|
|
496
473
|
export type ForStatementProps = {
|
|
497
|
-
+init?: ?
|
|
498
|
-
+test?: ?
|
|
499
|
-
+update?: ?
|
|
500
|
-
+body:
|
|
474
|
+
+init?: ?MaybeDetachedNode<ForStatementType['init']>,
|
|
475
|
+
+test?: ?MaybeDetachedNode<ForStatementType['test']>,
|
|
476
|
+
+update?: ?MaybeDetachedNode<ForStatementType['update']>,
|
|
477
|
+
+body: MaybeDetachedNode<ForStatementType['body']>,
|
|
501
478
|
};
|
|
502
479
|
|
|
503
480
|
export type FunctionDeclarationProps = {
|
|
504
|
-
+id?: ?
|
|
481
|
+
+id?: ?MaybeDetachedNode<FunctionDeclarationType['id']>,
|
|
505
482
|
+params: $ReadOnlyArray<
|
|
506
|
-
|
|
483
|
+
MaybeDetachedNode<FunctionDeclarationType['params'][number]>,
|
|
507
484
|
>,
|
|
508
|
-
+body:
|
|
509
|
-
+typeParameters?: ?
|
|
510
|
-
|
|
511
|
-
|
|
485
|
+
+body: MaybeDetachedNode<FunctionDeclarationType['body']>,
|
|
486
|
+
+typeParameters?: ?MaybeDetachedNode<
|
|
487
|
+
FunctionDeclarationType['typeParameters'],
|
|
488
|
+
>,
|
|
489
|
+
+returnType?: ?MaybeDetachedNode<FunctionDeclarationType['returnType']>,
|
|
490
|
+
+predicate?: ?MaybeDetachedNode<FunctionDeclarationType['predicate']>,
|
|
512
491
|
+generator: FunctionDeclarationType['generator'],
|
|
513
492
|
+async: FunctionDeclarationType['async'],
|
|
514
493
|
};
|
|
515
494
|
|
|
516
495
|
export type FunctionExpressionProps = {
|
|
517
|
-
+id?: ?
|
|
496
|
+
+id?: ?MaybeDetachedNode<FunctionExpressionType['id']>,
|
|
518
497
|
+params: $ReadOnlyArray<
|
|
519
|
-
|
|
498
|
+
MaybeDetachedNode<FunctionExpressionType['params'][number]>,
|
|
499
|
+
>,
|
|
500
|
+
+body: MaybeDetachedNode<FunctionExpressionType['body']>,
|
|
501
|
+
+typeParameters?: ?MaybeDetachedNode<
|
|
502
|
+
FunctionExpressionType['typeParameters'],
|
|
520
503
|
>,
|
|
521
|
-
+
|
|
522
|
-
+
|
|
523
|
-
+returnType?: ?DetachedNode<FunctionExpressionType['returnType']>,
|
|
524
|
-
+predicate?: ?DetachedNode<FunctionExpressionType['predicate']>,
|
|
504
|
+
+returnType?: ?MaybeDetachedNode<FunctionExpressionType['returnType']>,
|
|
505
|
+
+predicate?: ?MaybeDetachedNode<FunctionExpressionType['predicate']>,
|
|
525
506
|
+generator: FunctionExpressionType['generator'],
|
|
526
507
|
+async: FunctionExpressionType['async'],
|
|
527
508
|
};
|
|
528
509
|
|
|
529
510
|
export type FunctionTypeAnnotationProps = {
|
|
530
511
|
+params: $ReadOnlyArray<
|
|
531
|
-
|
|
512
|
+
MaybeDetachedNode<FunctionTypeAnnotationType['params'][number]>,
|
|
513
|
+
>,
|
|
514
|
+
+this?: ?MaybeDetachedNode<FunctionTypeAnnotationType['this']>,
|
|
515
|
+
+returnType: MaybeDetachedNode<FunctionTypeAnnotationType['returnType']>,
|
|
516
|
+
+rest?: ?MaybeDetachedNode<FunctionTypeAnnotationType['rest']>,
|
|
517
|
+
+typeParameters?: ?MaybeDetachedNode<
|
|
518
|
+
FunctionTypeAnnotationType['typeParameters'],
|
|
532
519
|
>,
|
|
533
|
-
+this?: ?DetachedNode<FunctionTypeAnnotationType['this']>,
|
|
534
|
-
+returnType: DetachedNode<FunctionTypeAnnotationType['returnType']>,
|
|
535
|
-
+rest?: ?DetachedNode<FunctionTypeAnnotationType['rest']>,
|
|
536
|
-
+typeParameters?: ?DetachedNode<FunctionTypeAnnotationType['typeParameters']>,
|
|
537
520
|
};
|
|
538
521
|
|
|
539
522
|
export type FunctionTypeParamProps = {
|
|
540
|
-
+name?: ?
|
|
541
|
-
+typeAnnotation:
|
|
523
|
+
+name?: ?MaybeDetachedNode<FunctionTypeParamType['name']>,
|
|
524
|
+
+typeAnnotation: MaybeDetachedNode<FunctionTypeParamType['typeAnnotation']>,
|
|
542
525
|
+optional: FunctionTypeParamType['optional'],
|
|
543
526
|
};
|
|
544
527
|
|
|
545
528
|
export type GenericTypeAnnotationProps = {
|
|
546
|
-
+id:
|
|
547
|
-
+typeParameters?: ?
|
|
529
|
+
+id: MaybeDetachedNode<GenericTypeAnnotationType['id']>,
|
|
530
|
+
+typeParameters?: ?MaybeDetachedNode<
|
|
531
|
+
GenericTypeAnnotationType['typeParameters'],
|
|
532
|
+
>,
|
|
548
533
|
};
|
|
549
534
|
|
|
550
535
|
export type IfStatementProps = {
|
|
551
|
-
+test:
|
|
552
|
-
+consequent:
|
|
553
|
-
+alternate?: ?
|
|
536
|
+
+test: MaybeDetachedNode<IfStatementType['test']>,
|
|
537
|
+
+consequent: MaybeDetachedNode<IfStatementType['consequent']>,
|
|
538
|
+
+alternate?: ?MaybeDetachedNode<IfStatementType['alternate']>,
|
|
554
539
|
};
|
|
555
540
|
|
|
556
541
|
export type ImportAttributeProps = {
|
|
557
|
-
+key:
|
|
558
|
-
+value:
|
|
542
|
+
+key: MaybeDetachedNode<ImportAttributeType['key']>,
|
|
543
|
+
+value: MaybeDetachedNode<ImportAttributeType['value']>,
|
|
559
544
|
};
|
|
560
545
|
|
|
561
546
|
export type ImportDeclarationProps = {
|
|
562
547
|
+specifiers: $ReadOnlyArray<
|
|
563
|
-
|
|
548
|
+
MaybeDetachedNode<ImportDeclarationType['specifiers'][number]>,
|
|
564
549
|
>,
|
|
565
|
-
+source:
|
|
550
|
+
+source: MaybeDetachedNode<ImportDeclarationType['source']>,
|
|
566
551
|
+assertions?: ?$ReadOnlyArray<
|
|
567
|
-
|
|
552
|
+
MaybeDetachedNode<ImportDeclarationType['assertions'][number]>,
|
|
568
553
|
>,
|
|
569
554
|
+importKind: ImportDeclarationType['importKind'],
|
|
570
555
|
};
|
|
571
556
|
|
|
572
557
|
export type ImportDefaultSpecifierProps = {
|
|
573
|
-
+local:
|
|
558
|
+
+local: MaybeDetachedNode<ImportDefaultSpecifierType['local']>,
|
|
574
559
|
};
|
|
575
560
|
|
|
576
561
|
export type ImportExpressionProps = {
|
|
577
|
-
+source:
|
|
578
|
-
+attributes?: ?
|
|
562
|
+
+source: MaybeDetachedNode<ImportExpressionType['source']>,
|
|
563
|
+
+attributes?: ?MaybeDetachedNode<ImportExpressionType['attributes']>,
|
|
579
564
|
};
|
|
580
565
|
|
|
581
566
|
export type ImportNamespaceSpecifierProps = {
|
|
582
|
-
+local:
|
|
567
|
+
+local: MaybeDetachedNode<ImportNamespaceSpecifierType['local']>,
|
|
583
568
|
};
|
|
584
569
|
|
|
585
570
|
export type ImportSpecifierProps = {
|
|
586
|
-
+imported:
|
|
587
|
-
+local:
|
|
571
|
+
+imported: MaybeDetachedNode<ImportSpecifierType['imported']>,
|
|
572
|
+
+local: MaybeDetachedNode<ImportSpecifierType['local']>,
|
|
588
573
|
+importKind: ImportSpecifierType['importKind'],
|
|
589
574
|
};
|
|
590
575
|
|
|
591
576
|
export type IndexedAccessTypeProps = {
|
|
592
|
-
+objectType:
|
|
593
|
-
+indexType:
|
|
577
|
+
+objectType: MaybeDetachedNode<IndexedAccessTypeType['objectType']>,
|
|
578
|
+
+indexType: MaybeDetachedNode<IndexedAccessTypeType['indexType']>,
|
|
594
579
|
};
|
|
595
580
|
|
|
596
581
|
export type InferredPredicateProps = {};
|
|
597
582
|
|
|
598
583
|
export type InterfaceDeclarationProps = {
|
|
599
|
-
+id:
|
|
600
|
-
+typeParameters?: ?
|
|
584
|
+
+id: MaybeDetachedNode<InterfaceDeclarationType['id']>,
|
|
585
|
+
+typeParameters?: ?MaybeDetachedNode<
|
|
586
|
+
InterfaceDeclarationType['typeParameters'],
|
|
587
|
+
>,
|
|
601
588
|
+extends: $ReadOnlyArray<
|
|
602
|
-
|
|
589
|
+
MaybeDetachedNode<InterfaceDeclarationType['extends'][number]>,
|
|
603
590
|
>,
|
|
604
|
-
+body:
|
|
591
|
+
+body: MaybeDetachedNode<InterfaceDeclarationType['body']>,
|
|
605
592
|
};
|
|
606
593
|
|
|
607
594
|
export type InterfaceExtendsProps = {
|
|
608
|
-
+id:
|
|
609
|
-
+typeParameters?: ?
|
|
595
|
+
+id: MaybeDetachedNode<InterfaceExtendsType['id']>,
|
|
596
|
+
+typeParameters?: ?MaybeDetachedNode<InterfaceExtendsType['typeParameters']>,
|
|
610
597
|
};
|
|
611
598
|
|
|
612
599
|
export type InterfaceTypeAnnotationProps = {
|
|
613
600
|
+extends: $ReadOnlyArray<
|
|
614
|
-
|
|
601
|
+
MaybeDetachedNode<InterfaceTypeAnnotationType['extends'][number]>,
|
|
615
602
|
>,
|
|
616
|
-
+body?: ?
|
|
603
|
+
+body?: ?MaybeDetachedNode<InterfaceTypeAnnotationType['body']>,
|
|
617
604
|
};
|
|
618
605
|
|
|
619
606
|
export type IntersectionTypeAnnotationProps = {
|
|
620
607
|
+types: $ReadOnlyArray<
|
|
621
|
-
|
|
608
|
+
MaybeDetachedNode<IntersectionTypeAnnotationType['types'][number]>,
|
|
622
609
|
>,
|
|
623
610
|
};
|
|
624
611
|
|
|
625
612
|
export type JSXAttributeProps = {
|
|
626
|
-
+name:
|
|
627
|
-
+value?: ?
|
|
613
|
+
+name: MaybeDetachedNode<JSXAttributeType['name']>,
|
|
614
|
+
+value?: ?MaybeDetachedNode<JSXAttributeType['value']>,
|
|
628
615
|
};
|
|
629
616
|
|
|
630
617
|
export type JSXClosingElementProps = {
|
|
631
|
-
+name:
|
|
618
|
+
+name: MaybeDetachedNode<JSXClosingElementType['name']>,
|
|
632
619
|
};
|
|
633
620
|
|
|
634
621
|
export type JSXClosingFragmentProps = {};
|
|
635
622
|
|
|
636
623
|
export type JSXElementProps = {
|
|
637
|
-
+openingElement:
|
|
638
|
-
+children: $ReadOnlyArray<
|
|
639
|
-
|
|
624
|
+
+openingElement: MaybeDetachedNode<JSXElementType['openingElement']>,
|
|
625
|
+
+children: $ReadOnlyArray<
|
|
626
|
+
MaybeDetachedNode<JSXElementType['children'][number]>,
|
|
627
|
+
>,
|
|
628
|
+
+closingElement?: ?MaybeDetachedNode<JSXElementType['closingElement']>,
|
|
640
629
|
};
|
|
641
630
|
|
|
642
631
|
export type JSXEmptyExpressionProps = {};
|
|
643
632
|
|
|
644
633
|
export type JSXExpressionContainerProps = {
|
|
645
|
-
+expression:
|
|
634
|
+
+expression: MaybeDetachedNode<JSXExpressionContainerType['expression']>,
|
|
646
635
|
};
|
|
647
636
|
|
|
648
637
|
export type JSXFragmentProps = {
|
|
649
|
-
+openingFragment:
|
|
650
|
-
+children: $ReadOnlyArray<
|
|
651
|
-
|
|
638
|
+
+openingFragment: MaybeDetachedNode<JSXFragmentType['openingFragment']>,
|
|
639
|
+
+children: $ReadOnlyArray<
|
|
640
|
+
MaybeDetachedNode<JSXFragmentType['children'][number]>,
|
|
641
|
+
>,
|
|
642
|
+
+closingFragment: MaybeDetachedNode<JSXFragmentType['closingFragment']>,
|
|
652
643
|
};
|
|
653
644
|
|
|
654
645
|
export type JSXIdentifierProps = {
|
|
@@ -656,19 +647,19 @@ export type JSXIdentifierProps = {
|
|
|
656
647
|
};
|
|
657
648
|
|
|
658
649
|
export type JSXMemberExpressionProps = {
|
|
659
|
-
+object:
|
|
660
|
-
+property:
|
|
650
|
+
+object: MaybeDetachedNode<JSXMemberExpressionType['object']>,
|
|
651
|
+
+property: MaybeDetachedNode<JSXMemberExpressionType['property']>,
|
|
661
652
|
};
|
|
662
653
|
|
|
663
654
|
export type JSXNamespacedNameProps = {
|
|
664
|
-
+namespace:
|
|
665
|
-
+name:
|
|
655
|
+
+namespace: MaybeDetachedNode<JSXNamespacedNameType['namespace']>,
|
|
656
|
+
+name: MaybeDetachedNode<JSXNamespacedNameType['name']>,
|
|
666
657
|
};
|
|
667
658
|
|
|
668
659
|
export type JSXOpeningElementProps = {
|
|
669
|
-
+name:
|
|
660
|
+
+name: MaybeDetachedNode<JSXOpeningElementType['name']>,
|
|
670
661
|
+attributes: $ReadOnlyArray<
|
|
671
|
-
|
|
662
|
+
MaybeDetachedNode<JSXOpeningElementType['attributes'][number]>,
|
|
672
663
|
>,
|
|
673
664
|
+selfClosing: JSXOpeningElementType['selfClosing'],
|
|
674
665
|
};
|
|
@@ -676,11 +667,11 @@ export type JSXOpeningElementProps = {
|
|
|
676
667
|
export type JSXOpeningFragmentProps = {};
|
|
677
668
|
|
|
678
669
|
export type JSXSpreadAttributeProps = {
|
|
679
|
-
+argument:
|
|
670
|
+
+argument: MaybeDetachedNode<JSXSpreadAttributeType['argument']>,
|
|
680
671
|
};
|
|
681
672
|
|
|
682
673
|
export type JSXSpreadChildProps = {
|
|
683
|
-
+expression:
|
|
674
|
+
+expression: MaybeDetachedNode<JSXSpreadChildType['expression']>,
|
|
684
675
|
};
|
|
685
676
|
|
|
686
677
|
export type JSXTextProps = {
|
|
@@ -689,30 +680,30 @@ export type JSXTextProps = {
|
|
|
689
680
|
};
|
|
690
681
|
|
|
691
682
|
export type LabeledStatementProps = {
|
|
692
|
-
+label:
|
|
693
|
-
+body:
|
|
683
|
+
+label: MaybeDetachedNode<LabeledStatementType['label']>,
|
|
684
|
+
+body: MaybeDetachedNode<LabeledStatementType['body']>,
|
|
694
685
|
};
|
|
695
686
|
|
|
696
687
|
export type LogicalExpressionProps = {
|
|
697
|
-
+left:
|
|
698
|
-
+right:
|
|
688
|
+
+left: MaybeDetachedNode<LogicalExpressionType['left']>,
|
|
689
|
+
+right: MaybeDetachedNode<LogicalExpressionType['right']>,
|
|
699
690
|
+operator: LogicalExpressionType['operator'],
|
|
700
691
|
};
|
|
701
692
|
|
|
702
693
|
export type MemberExpressionProps = {
|
|
703
|
-
+object:
|
|
704
|
-
+property:
|
|
694
|
+
+object: MaybeDetachedNode<MemberExpressionType['object']>,
|
|
695
|
+
+property: MaybeDetachedNode<MemberExpressionType['property']>,
|
|
705
696
|
+computed: MemberExpressionType['computed'],
|
|
706
697
|
};
|
|
707
698
|
|
|
708
699
|
export type MetaPropertyProps = {
|
|
709
|
-
+meta:
|
|
710
|
-
+property:
|
|
700
|
+
+meta: MaybeDetachedNode<MetaPropertyType['meta']>,
|
|
701
|
+
+property: MaybeDetachedNode<MetaPropertyType['property']>,
|
|
711
702
|
};
|
|
712
703
|
|
|
713
704
|
export type MethodDefinitionProps = {
|
|
714
|
-
+key:
|
|
715
|
-
+value:
|
|
705
|
+
+key: MaybeDetachedNode<MethodDefinitionType['key']>,
|
|
706
|
+
+value: MaybeDetachedNode<MethodDefinitionType['value']>,
|
|
716
707
|
+kind: MethodDefinitionType['kind'],
|
|
717
708
|
+computed: MethodDefinitionType['computed'],
|
|
718
709
|
+static: MethodDefinitionType['static'],
|
|
@@ -721,15 +712,17 @@ export type MethodDefinitionProps = {
|
|
|
721
712
|
export type MixedTypeAnnotationProps = {};
|
|
722
713
|
|
|
723
714
|
export type NewExpressionProps = {
|
|
724
|
-
+callee:
|
|
725
|
-
+typeArguments?: ?
|
|
715
|
+
+callee: MaybeDetachedNode<NewExpressionType['callee']>,
|
|
716
|
+
+typeArguments?: ?MaybeDetachedNode<NewExpressionType['typeArguments']>,
|
|
726
717
|
+arguments: $ReadOnlyArray<
|
|
727
|
-
|
|
718
|
+
MaybeDetachedNode<NewExpressionType['arguments'][number]>,
|
|
728
719
|
>,
|
|
729
720
|
};
|
|
730
721
|
|
|
731
722
|
export type NullableTypeAnnotationProps = {
|
|
732
|
-
+typeAnnotation:
|
|
723
|
+
+typeAnnotation: MaybeDetachedNode<
|
|
724
|
+
NullableTypeAnnotationType['typeAnnotation'],
|
|
725
|
+
>,
|
|
733
726
|
};
|
|
734
727
|
|
|
735
728
|
export type NullLiteralTypeAnnotationProps = {};
|
|
@@ -743,133 +736,132 @@ export type NumberTypeAnnotationProps = {};
|
|
|
743
736
|
|
|
744
737
|
export type ObjectExpressionProps = {
|
|
745
738
|
+properties: $ReadOnlyArray<
|
|
746
|
-
|
|
739
|
+
MaybeDetachedNode<ObjectExpressionType['properties'][number]>,
|
|
747
740
|
>,
|
|
748
741
|
};
|
|
749
742
|
|
|
750
743
|
export type ObjectPatternProps = {
|
|
751
744
|
+properties: $ReadOnlyArray<
|
|
752
|
-
|
|
745
|
+
MaybeDetachedNode<ObjectPatternType['properties'][number]>,
|
|
753
746
|
>,
|
|
754
|
-
+typeAnnotation?: ?
|
|
747
|
+
+typeAnnotation?: ?MaybeDetachedNode<ObjectPatternType['typeAnnotation']>,
|
|
755
748
|
};
|
|
756
749
|
|
|
757
750
|
export type ObjectTypeAnnotationProps = {
|
|
758
751
|
+properties: $ReadOnlyArray<
|
|
759
|
-
|
|
752
|
+
MaybeDetachedNode<ObjectTypeAnnotationType['properties'][number]>,
|
|
760
753
|
>,
|
|
761
754
|
+indexers: $ReadOnlyArray<
|
|
762
|
-
|
|
755
|
+
MaybeDetachedNode<ObjectTypeAnnotationType['indexers'][number]>,
|
|
763
756
|
>,
|
|
764
757
|
+callProperties: $ReadOnlyArray<
|
|
765
|
-
|
|
758
|
+
MaybeDetachedNode<ObjectTypeAnnotationType['callProperties'][number]>,
|
|
766
759
|
>,
|
|
767
760
|
+internalSlots: $ReadOnlyArray<
|
|
768
|
-
|
|
761
|
+
MaybeDetachedNode<ObjectTypeAnnotationType['internalSlots'][number]>,
|
|
769
762
|
>,
|
|
770
763
|
+inexact: ObjectTypeAnnotationType['inexact'],
|
|
771
764
|
+exact: ObjectTypeAnnotationType['exact'],
|
|
772
765
|
};
|
|
773
766
|
|
|
774
767
|
export type ObjectTypeCallPropertyProps = {
|
|
775
|
-
+value:
|
|
768
|
+
+value: MaybeDetachedNode<ObjectTypeCallPropertyType['value']>,
|
|
776
769
|
+static: ObjectTypeCallPropertyType['static'],
|
|
777
770
|
};
|
|
778
771
|
|
|
779
772
|
export type ObjectTypeIndexerProps = {
|
|
780
|
-
+id?: ?
|
|
781
|
-
+key:
|
|
782
|
-
+value:
|
|
773
|
+
+id?: ?MaybeDetachedNode<ObjectTypeIndexerType['id']>,
|
|
774
|
+
+key: MaybeDetachedNode<ObjectTypeIndexerType['key']>,
|
|
775
|
+
+value: MaybeDetachedNode<ObjectTypeIndexerType['value']>,
|
|
783
776
|
+static: ObjectTypeIndexerType['static'],
|
|
784
|
-
+variance?: ?
|
|
777
|
+
+variance?: ?MaybeDetachedNode<ObjectTypeIndexerType['variance']>,
|
|
785
778
|
};
|
|
786
779
|
|
|
787
780
|
export type ObjectTypeInternalSlotProps = {
|
|
788
|
-
+id:
|
|
789
|
-
+value:
|
|
781
|
+
+id: MaybeDetachedNode<ObjectTypeInternalSlotType['id']>,
|
|
782
|
+
+value: MaybeDetachedNode<ObjectTypeInternalSlotType['value']>,
|
|
790
783
|
+optional: ObjectTypeInternalSlotType['optional'],
|
|
791
784
|
+static: ObjectTypeInternalSlotType['static'],
|
|
792
785
|
+method: ObjectTypeInternalSlotType['method'],
|
|
793
786
|
};
|
|
794
787
|
|
|
795
788
|
export type ObjectTypePropertyProps = {
|
|
796
|
-
+key:
|
|
797
|
-
+value:
|
|
789
|
+
+key: MaybeDetachedNode<ObjectTypePropertyType['key']>,
|
|
790
|
+
+value: MaybeDetachedNode<ObjectTypePropertyType['value']>,
|
|
798
791
|
+method: ObjectTypePropertyType['method'],
|
|
799
792
|
+optional: ObjectTypePropertyType['optional'],
|
|
800
793
|
+static: ObjectTypePropertyType['static'],
|
|
801
794
|
+proto: ObjectTypePropertyType['proto'],
|
|
802
|
-
+variance?: ?
|
|
795
|
+
+variance?: ?MaybeDetachedNode<ObjectTypePropertyType['variance']>,
|
|
803
796
|
+kind: ObjectTypePropertyType['kind'],
|
|
804
797
|
};
|
|
805
798
|
|
|
806
799
|
export type ObjectTypeSpreadPropertyProps = {
|
|
807
|
-
+argument:
|
|
800
|
+
+argument: MaybeDetachedNode<ObjectTypeSpreadPropertyType['argument']>,
|
|
808
801
|
};
|
|
809
802
|
|
|
810
803
|
export type OpaqueTypeProps = {
|
|
811
|
-
+id:
|
|
812
|
-
+typeParameters?: ?
|
|
813
|
-
+impltype:
|
|
814
|
-
+supertype?: ?
|
|
815
|
-
};
|
|
816
|
-
|
|
817
|
-
export type OptionalCallExpressionProps = {
|
|
818
|
-
+callee: DetachedNode<OptionalCallExpressionType['callee']>,
|
|
819
|
-
+typeArguments?: ?DetachedNode<OptionalCallExpressionType['typeArguments']>,
|
|
820
|
-
+arguments: $ReadOnlyArray<
|
|
821
|
-
DetachedNode<OptionalCallExpressionType['arguments'][number]>,
|
|
822
|
-
>,
|
|
823
|
-
+optional: OptionalCallExpressionType['optional'],
|
|
804
|
+
+id: MaybeDetachedNode<OpaqueTypeType['id']>,
|
|
805
|
+
+typeParameters?: ?MaybeDetachedNode<OpaqueTypeType['typeParameters']>,
|
|
806
|
+
+impltype: MaybeDetachedNode<OpaqueTypeType['impltype']>,
|
|
807
|
+
+supertype?: ?MaybeDetachedNode<OpaqueTypeType['supertype']>,
|
|
824
808
|
};
|
|
825
809
|
|
|
826
810
|
export type OptionalIndexedAccessTypeProps = {
|
|
827
|
-
+objectType:
|
|
828
|
-
+indexType:
|
|
811
|
+
+objectType: MaybeDetachedNode<OptionalIndexedAccessTypeType['objectType']>,
|
|
812
|
+
+indexType: MaybeDetachedNode<OptionalIndexedAccessTypeType['indexType']>,
|
|
829
813
|
+optional: OptionalIndexedAccessTypeType['optional'],
|
|
830
814
|
};
|
|
831
815
|
|
|
832
|
-
export type
|
|
833
|
-
+
|
|
834
|
-
+property: DetachedNode<OptionalMemberExpressionType['property']>,
|
|
835
|
-
+computed: OptionalMemberExpressionType['computed'],
|
|
836
|
-
+optional: OptionalMemberExpressionType['optional'],
|
|
837
|
-
};
|
|
838
|
-
|
|
839
|
-
export type PrivateNameProps = {
|
|
840
|
-
+id: DetachedNode<PrivateNameType['id']>,
|
|
816
|
+
export type PrivateIdentifierProps = {
|
|
817
|
+
+name: PrivateIdentifierType['name'],
|
|
841
818
|
};
|
|
842
819
|
|
|
843
820
|
export type PropertyProps = {
|
|
844
|
-
+key:
|
|
845
|
-
+value:
|
|
821
|
+
+key: MaybeDetachedNode<PropertyType['key']>,
|
|
822
|
+
+value: MaybeDetachedNode<PropertyType['value']>,
|
|
846
823
|
+kind: PropertyType['kind'],
|
|
847
824
|
+computed: PropertyType['computed'],
|
|
848
825
|
+method: PropertyType['method'],
|
|
849
826
|
+shorthand: PropertyType['shorthand'],
|
|
850
827
|
};
|
|
851
828
|
|
|
829
|
+
export type PropertyDefinitionProps = {
|
|
830
|
+
+key: MaybeDetachedNode<PropertyDefinitionType['key']>,
|
|
831
|
+
+value?: ?MaybeDetachedNode<PropertyDefinitionType['value']>,
|
|
832
|
+
+computed: PropertyDefinitionType['computed'],
|
|
833
|
+
+static: PropertyDefinitionType['static'],
|
|
834
|
+
+declare: PropertyDefinitionType['declare'],
|
|
835
|
+
+optional: PropertyDefinitionType['optional'],
|
|
836
|
+
+variance?: ?MaybeDetachedNode<PropertyDefinitionType['variance']>,
|
|
837
|
+
+typeAnnotation?: ?MaybeDetachedNode<
|
|
838
|
+
PropertyDefinitionType['typeAnnotation'],
|
|
839
|
+
>,
|
|
840
|
+
};
|
|
841
|
+
|
|
852
842
|
export type QualifiedTypeIdentifierProps = {
|
|
853
|
-
+qualification:
|
|
854
|
-
|
|
843
|
+
+qualification: MaybeDetachedNode<
|
|
844
|
+
QualifiedTypeIdentifierType['qualification'],
|
|
845
|
+
>,
|
|
846
|
+
+id: MaybeDetachedNode<QualifiedTypeIdentifierType['id']>,
|
|
855
847
|
};
|
|
856
848
|
|
|
857
849
|
export type RestElementProps = {
|
|
858
|
-
+argument:
|
|
850
|
+
+argument: MaybeDetachedNode<RestElementType['argument']>,
|
|
859
851
|
};
|
|
860
852
|
|
|
861
853
|
export type ReturnStatementProps = {
|
|
862
|
-
+argument?: ?
|
|
854
|
+
+argument?: ?MaybeDetachedNode<ReturnStatementType['argument']>,
|
|
863
855
|
};
|
|
864
856
|
|
|
865
857
|
export type SequenceExpressionProps = {
|
|
866
858
|
+expressions: $ReadOnlyArray<
|
|
867
|
-
|
|
859
|
+
MaybeDetachedNode<SequenceExpressionType['expressions'][number]>,
|
|
868
860
|
>,
|
|
869
861
|
};
|
|
870
862
|
|
|
871
863
|
export type SpreadElementProps = {
|
|
872
|
-
+argument:
|
|
864
|
+
+argument: MaybeDetachedNode<SpreadElementType['argument']>,
|
|
873
865
|
};
|
|
874
866
|
|
|
875
867
|
export type StringLiteralTypeAnnotationProps = {
|
|
@@ -882,28 +874,32 @@ export type StringTypeAnnotationProps = {};
|
|
|
882
874
|
export type SuperProps = {};
|
|
883
875
|
|
|
884
876
|
export type SwitchCaseProps = {
|
|
885
|
-
+test?: ?
|
|
877
|
+
+test?: ?MaybeDetachedNode<SwitchCaseType['test']>,
|
|
886
878
|
+consequent: $ReadOnlyArray<
|
|
887
|
-
|
|
879
|
+
MaybeDetachedNode<SwitchCaseType['consequent'][number]>,
|
|
888
880
|
>,
|
|
889
881
|
};
|
|
890
882
|
|
|
891
883
|
export type SwitchStatementProps = {
|
|
892
|
-
+discriminant:
|
|
893
|
-
+cases: $ReadOnlyArray<
|
|
884
|
+
+discriminant: MaybeDetachedNode<SwitchStatementType['discriminant']>,
|
|
885
|
+
+cases: $ReadOnlyArray<
|
|
886
|
+
MaybeDetachedNode<SwitchStatementType['cases'][number]>,
|
|
887
|
+
>,
|
|
894
888
|
};
|
|
895
889
|
|
|
896
890
|
export type SymbolTypeAnnotationProps = {};
|
|
897
891
|
|
|
898
892
|
export type TaggedTemplateExpressionProps = {
|
|
899
|
-
+tag:
|
|
900
|
-
+quasi:
|
|
893
|
+
+tag: MaybeDetachedNode<TaggedTemplateExpressionType['tag']>,
|
|
894
|
+
+quasi: MaybeDetachedNode<TaggedTemplateExpressionType['quasi']>,
|
|
901
895
|
};
|
|
902
896
|
|
|
903
897
|
export type TemplateLiteralProps = {
|
|
904
|
-
+quasis: $ReadOnlyArray<
|
|
898
|
+
+quasis: $ReadOnlyArray<
|
|
899
|
+
MaybeDetachedNode<TemplateLiteralType['quasis'][number]>,
|
|
900
|
+
>,
|
|
905
901
|
+expressions: $ReadOnlyArray<
|
|
906
|
-
|
|
902
|
+
MaybeDetachedNode<TemplateLiteralType['expressions'][number]>,
|
|
907
903
|
>,
|
|
908
904
|
};
|
|
909
905
|
|
|
@@ -912,87 +908,87 @@ export type ThisExpressionProps = {};
|
|
|
912
908
|
export type ThisTypeAnnotationProps = {};
|
|
913
909
|
|
|
914
910
|
export type ThrowStatementProps = {
|
|
915
|
-
+argument:
|
|
911
|
+
+argument: MaybeDetachedNode<ThrowStatementType['argument']>,
|
|
916
912
|
};
|
|
917
913
|
|
|
918
914
|
export type TryStatementProps = {
|
|
919
|
-
+block:
|
|
920
|
-
+handler?: ?
|
|
921
|
-
+finalizer?: ?
|
|
915
|
+
+block: MaybeDetachedNode<TryStatementType['block']>,
|
|
916
|
+
+handler?: ?MaybeDetachedNode<TryStatementType['handler']>,
|
|
917
|
+
+finalizer?: ?MaybeDetachedNode<TryStatementType['finalizer']>,
|
|
922
918
|
};
|
|
923
919
|
|
|
924
920
|
export type TupleTypeAnnotationProps = {
|
|
925
921
|
+types: $ReadOnlyArray<
|
|
926
|
-
|
|
922
|
+
MaybeDetachedNode<TupleTypeAnnotationType['types'][number]>,
|
|
927
923
|
>,
|
|
928
924
|
};
|
|
929
925
|
|
|
930
926
|
export type TypeAliasProps = {
|
|
931
|
-
+id:
|
|
932
|
-
+typeParameters?: ?
|
|
933
|
-
+right:
|
|
927
|
+
+id: MaybeDetachedNode<TypeAliasType['id']>,
|
|
928
|
+
+typeParameters?: ?MaybeDetachedNode<TypeAliasType['typeParameters']>,
|
|
929
|
+
+right: MaybeDetachedNode<TypeAliasType['right']>,
|
|
934
930
|
};
|
|
935
931
|
|
|
936
932
|
export type TypeAnnotationProps = {
|
|
937
|
-
+typeAnnotation:
|
|
933
|
+
+typeAnnotation: MaybeDetachedNode<TypeAnnotationType['typeAnnotation']>,
|
|
938
934
|
};
|
|
939
935
|
|
|
940
936
|
export type TypeCastExpressionProps = {
|
|
941
|
-
+expression:
|
|
942
|
-
+typeAnnotation:
|
|
937
|
+
+expression: MaybeDetachedNode<TypeCastExpressionType['expression']>,
|
|
938
|
+
+typeAnnotation: MaybeDetachedNode<TypeCastExpressionType['typeAnnotation']>,
|
|
943
939
|
};
|
|
944
940
|
|
|
945
941
|
export type TypeofTypeAnnotationProps = {
|
|
946
|
-
+argument:
|
|
942
|
+
+argument: MaybeDetachedNode<TypeofTypeAnnotationType['argument']>,
|
|
947
943
|
};
|
|
948
944
|
|
|
949
945
|
export type TypeParameterProps = {
|
|
950
946
|
+name: TypeParameterType['name'],
|
|
951
|
-
+bound?: ?
|
|
952
|
-
+variance?: ?
|
|
953
|
-
+default?: ?
|
|
947
|
+
+bound?: ?MaybeDetachedNode<TypeParameterType['bound']>,
|
|
948
|
+
+variance?: ?MaybeDetachedNode<TypeParameterType['variance']>,
|
|
949
|
+
+default?: ?MaybeDetachedNode<TypeParameterType['default']>,
|
|
954
950
|
};
|
|
955
951
|
|
|
956
952
|
export type TypeParameterDeclarationProps = {
|
|
957
953
|
+params: $ReadOnlyArray<
|
|
958
|
-
|
|
954
|
+
MaybeDetachedNode<TypeParameterDeclarationType['params'][number]>,
|
|
959
955
|
>,
|
|
960
956
|
};
|
|
961
957
|
|
|
962
958
|
export type TypeParameterInstantiationProps = {
|
|
963
959
|
+params: $ReadOnlyArray<
|
|
964
|
-
|
|
960
|
+
MaybeDetachedNode<TypeParameterInstantiationType['params'][number]>,
|
|
965
961
|
>,
|
|
966
962
|
};
|
|
967
963
|
|
|
968
964
|
export type UnaryExpressionProps = {
|
|
969
965
|
+operator: UnaryExpressionType['operator'],
|
|
970
|
-
+argument:
|
|
966
|
+
+argument: MaybeDetachedNode<UnaryExpressionType['argument']>,
|
|
971
967
|
+prefix: UnaryExpressionType['prefix'],
|
|
972
968
|
};
|
|
973
969
|
|
|
974
970
|
export type UnionTypeAnnotationProps = {
|
|
975
971
|
+types: $ReadOnlyArray<
|
|
976
|
-
|
|
972
|
+
MaybeDetachedNode<UnionTypeAnnotationType['types'][number]>,
|
|
977
973
|
>,
|
|
978
974
|
};
|
|
979
975
|
|
|
980
976
|
export type UpdateExpressionProps = {
|
|
981
977
|
+operator: UpdateExpressionType['operator'],
|
|
982
|
-
+argument:
|
|
978
|
+
+argument: MaybeDetachedNode<UpdateExpressionType['argument']>,
|
|
983
979
|
+prefix: UpdateExpressionType['prefix'],
|
|
984
980
|
};
|
|
985
981
|
|
|
986
982
|
export type VariableDeclarationProps = {
|
|
987
983
|
+kind: VariableDeclarationType['kind'],
|
|
988
984
|
+declarations: $ReadOnlyArray<
|
|
989
|
-
|
|
985
|
+
MaybeDetachedNode<VariableDeclarationType['declarations'][number]>,
|
|
990
986
|
>,
|
|
991
987
|
};
|
|
992
988
|
|
|
993
989
|
export type VariableDeclaratorProps = {
|
|
994
|
-
+init?: ?
|
|
995
|
-
+id:
|
|
990
|
+
+init?: ?MaybeDetachedNode<VariableDeclaratorType['init']>,
|
|
991
|
+
+id: MaybeDetachedNode<VariableDeclaratorType['id']>,
|
|
996
992
|
};
|
|
997
993
|
|
|
998
994
|
export type VarianceProps = {
|
|
@@ -1002,2170 +998,1916 @@ export type VarianceProps = {
|
|
|
1002
998
|
export type VoidTypeAnnotationProps = {};
|
|
1003
999
|
|
|
1004
1000
|
export type WhileStatementProps = {
|
|
1005
|
-
+body:
|
|
1006
|
-
+test:
|
|
1001
|
+
+body: MaybeDetachedNode<WhileStatementType['body']>,
|
|
1002
|
+
+test: MaybeDetachedNode<WhileStatementType['test']>,
|
|
1007
1003
|
};
|
|
1008
1004
|
|
|
1009
1005
|
export type WithStatementProps = {
|
|
1010
|
-
+object:
|
|
1011
|
-
+body:
|
|
1006
|
+
+object: MaybeDetachedNode<WithStatementType['object']>,
|
|
1007
|
+
+body: MaybeDetachedNode<WithStatementType['body']>,
|
|
1012
1008
|
};
|
|
1013
1009
|
|
|
1014
1010
|
export type YieldExpressionProps = {
|
|
1015
|
-
+argument?: ?
|
|
1011
|
+
+argument?: ?MaybeDetachedNode<YieldExpressionType['argument']>,
|
|
1016
1012
|
+delegate?: ?YieldExpressionType['delegate'],
|
|
1017
1013
|
};
|
|
1018
1014
|
|
|
1019
|
-
export function AnyTypeAnnotation(
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
return detachedProps<AnyTypeAnnotationType>(parent, {
|
|
1015
|
+
export function AnyTypeAnnotation(
|
|
1016
|
+
props: {
|
|
1017
|
+
+parent?: ESNode,
|
|
1018
|
+
} = {...null},
|
|
1019
|
+
): DetachedNode<AnyTypeAnnotationType> {
|
|
1020
|
+
return detachedProps<AnyTypeAnnotationType>(props.parent, {
|
|
1025
1021
|
type: 'AnyTypeAnnotation',
|
|
1026
1022
|
});
|
|
1027
1023
|
}
|
|
1028
1024
|
|
|
1029
|
-
export function ArrayExpression({
|
|
1030
|
-
parent,
|
|
1031
|
-
...props
|
|
1032
|
-
}: {
|
|
1025
|
+
export function ArrayExpression(props: {
|
|
1033
1026
|
...$ReadOnly<ArrayExpressionProps>,
|
|
1034
1027
|
+parent?: ESNode,
|
|
1035
1028
|
}): DetachedNode<ArrayExpressionType> {
|
|
1036
|
-
const node = detachedProps<ArrayExpressionType>(parent, {
|
|
1029
|
+
const node = detachedProps<ArrayExpressionType>(props.parent, {
|
|
1037
1030
|
type: 'ArrayExpression',
|
|
1038
|
-
|
|
1031
|
+
elements: props.elements.map(n => asDetachedNode(n)),
|
|
1032
|
+
trailingComma: props.trailingComma,
|
|
1039
1033
|
});
|
|
1040
1034
|
setParentPointersInDirectChildren(node);
|
|
1041
1035
|
return node;
|
|
1042
1036
|
}
|
|
1043
1037
|
|
|
1044
|
-
export function ArrayPattern({
|
|
1045
|
-
parent,
|
|
1046
|
-
...props
|
|
1047
|
-
}: {
|
|
1038
|
+
export function ArrayPattern(props: {
|
|
1048
1039
|
...$ReadOnly<ArrayPatternProps>,
|
|
1049
1040
|
+parent?: ESNode,
|
|
1050
1041
|
}): DetachedNode<ArrayPatternType> {
|
|
1051
|
-
const node = detachedProps<ArrayPatternType>(parent, {
|
|
1042
|
+
const node = detachedProps<ArrayPatternType>(props.parent, {
|
|
1052
1043
|
type: 'ArrayPattern',
|
|
1053
|
-
|
|
1044
|
+
elements: props.elements.map(n => asDetachedNode(n)),
|
|
1045
|
+
typeAnnotation: asDetachedNode(props.typeAnnotation),
|
|
1054
1046
|
});
|
|
1055
1047
|
setParentPointersInDirectChildren(node);
|
|
1056
1048
|
return node;
|
|
1057
1049
|
}
|
|
1058
1050
|
|
|
1059
|
-
export function ArrayTypeAnnotation({
|
|
1060
|
-
parent,
|
|
1061
|
-
...props
|
|
1062
|
-
}: {
|
|
1051
|
+
export function ArrayTypeAnnotation(props: {
|
|
1063
1052
|
...$ReadOnly<ArrayTypeAnnotationProps>,
|
|
1064
1053
|
+parent?: ESNode,
|
|
1065
1054
|
}): DetachedNode<ArrayTypeAnnotationType> {
|
|
1066
|
-
const node = detachedProps<ArrayTypeAnnotationType>(parent, {
|
|
1055
|
+
const node = detachedProps<ArrayTypeAnnotationType>(props.parent, {
|
|
1067
1056
|
type: 'ArrayTypeAnnotation',
|
|
1068
|
-
|
|
1057
|
+
elementType: asDetachedNode(props.elementType),
|
|
1069
1058
|
});
|
|
1070
1059
|
setParentPointersInDirectChildren(node);
|
|
1071
1060
|
return node;
|
|
1072
1061
|
}
|
|
1073
1062
|
|
|
1074
|
-
export function AssignmentExpression({
|
|
1075
|
-
parent,
|
|
1076
|
-
...props
|
|
1077
|
-
}: {
|
|
1063
|
+
export function AssignmentExpression(props: {
|
|
1078
1064
|
...$ReadOnly<AssignmentExpressionProps>,
|
|
1079
1065
|
+parent?: ESNode,
|
|
1080
1066
|
}): DetachedNode<AssignmentExpressionType> {
|
|
1081
|
-
const node = detachedProps<AssignmentExpressionType>(parent, {
|
|
1067
|
+
const node = detachedProps<AssignmentExpressionType>(props.parent, {
|
|
1082
1068
|
type: 'AssignmentExpression',
|
|
1083
|
-
|
|
1069
|
+
operator: props.operator,
|
|
1070
|
+
left: asDetachedNode(props.left),
|
|
1071
|
+
right: asDetachedNode(props.right),
|
|
1084
1072
|
});
|
|
1085
1073
|
setParentPointersInDirectChildren(node);
|
|
1086
1074
|
return node;
|
|
1087
1075
|
}
|
|
1088
1076
|
|
|
1089
|
-
export function AssignmentPattern({
|
|
1090
|
-
parent,
|
|
1091
|
-
...props
|
|
1092
|
-
}: {
|
|
1077
|
+
export function AssignmentPattern(props: {
|
|
1093
1078
|
...$ReadOnly<AssignmentPatternProps>,
|
|
1094
1079
|
+parent?: ESNode,
|
|
1095
1080
|
}): DetachedNode<AssignmentPatternType> {
|
|
1096
|
-
const node = detachedProps<AssignmentPatternType>(parent, {
|
|
1081
|
+
const node = detachedProps<AssignmentPatternType>(props.parent, {
|
|
1097
1082
|
type: 'AssignmentPattern',
|
|
1098
|
-
|
|
1083
|
+
left: asDetachedNode(props.left),
|
|
1084
|
+
right: asDetachedNode(props.right),
|
|
1099
1085
|
});
|
|
1100
1086
|
setParentPointersInDirectChildren(node);
|
|
1101
1087
|
return node;
|
|
1102
1088
|
}
|
|
1103
1089
|
|
|
1104
|
-
export function AwaitExpression({
|
|
1105
|
-
parent,
|
|
1106
|
-
...props
|
|
1107
|
-
}: {
|
|
1090
|
+
export function AwaitExpression(props: {
|
|
1108
1091
|
...$ReadOnly<AwaitExpressionProps>,
|
|
1109
1092
|
+parent?: ESNode,
|
|
1110
1093
|
}): DetachedNode<AwaitExpressionType> {
|
|
1111
|
-
const node = detachedProps<AwaitExpressionType>(parent, {
|
|
1094
|
+
const node = detachedProps<AwaitExpressionType>(props.parent, {
|
|
1112
1095
|
type: 'AwaitExpression',
|
|
1113
|
-
|
|
1096
|
+
argument: asDetachedNode(props.argument),
|
|
1114
1097
|
});
|
|
1115
1098
|
setParentPointersInDirectChildren(node);
|
|
1116
1099
|
return node;
|
|
1117
1100
|
}
|
|
1118
1101
|
|
|
1119
|
-
export function BigIntLiteralTypeAnnotation({
|
|
1120
|
-
parent,
|
|
1121
|
-
...props
|
|
1122
|
-
}: {
|
|
1102
|
+
export function BigIntLiteralTypeAnnotation(props: {
|
|
1123
1103
|
...$ReadOnly<BigIntLiteralTypeAnnotationProps>,
|
|
1124
1104
|
+parent?: ESNode,
|
|
1125
1105
|
}): DetachedNode<BigIntLiteralTypeAnnotationType> {
|
|
1126
|
-
const node = detachedProps<BigIntLiteralTypeAnnotationType>(parent, {
|
|
1106
|
+
const node = detachedProps<BigIntLiteralTypeAnnotationType>(props.parent, {
|
|
1127
1107
|
type: 'BigIntLiteralTypeAnnotation',
|
|
1128
|
-
|
|
1108
|
+
raw: props.raw,
|
|
1129
1109
|
});
|
|
1130
1110
|
setParentPointersInDirectChildren(node);
|
|
1131
1111
|
return node;
|
|
1132
1112
|
}
|
|
1133
1113
|
|
|
1134
|
-
export function BinaryExpression({
|
|
1135
|
-
parent,
|
|
1136
|
-
...props
|
|
1137
|
-
}: {
|
|
1114
|
+
export function BinaryExpression(props: {
|
|
1138
1115
|
...$ReadOnly<BinaryExpressionProps>,
|
|
1139
1116
|
+parent?: ESNode,
|
|
1140
1117
|
}): DetachedNode<BinaryExpressionType> {
|
|
1141
|
-
const node = detachedProps<BinaryExpressionType>(parent, {
|
|
1118
|
+
const node = detachedProps<BinaryExpressionType>(props.parent, {
|
|
1142
1119
|
type: 'BinaryExpression',
|
|
1143
|
-
|
|
1120
|
+
left: asDetachedNode(props.left),
|
|
1121
|
+
right: asDetachedNode(props.right),
|
|
1122
|
+
operator: props.operator,
|
|
1144
1123
|
});
|
|
1145
1124
|
setParentPointersInDirectChildren(node);
|
|
1146
1125
|
return node;
|
|
1147
1126
|
}
|
|
1148
1127
|
|
|
1149
|
-
export function BlockStatement({
|
|
1150
|
-
parent,
|
|
1151
|
-
...props
|
|
1152
|
-
}: {
|
|
1128
|
+
export function BlockStatement(props: {
|
|
1153
1129
|
...$ReadOnly<BlockStatementProps>,
|
|
1154
1130
|
+parent?: ESNode,
|
|
1155
1131
|
}): DetachedNode<BlockStatementType> {
|
|
1156
|
-
const node = detachedProps<BlockStatementType>(parent, {
|
|
1132
|
+
const node = detachedProps<BlockStatementType>(props.parent, {
|
|
1157
1133
|
type: 'BlockStatement',
|
|
1158
|
-
|
|
1134
|
+
body: props.body.map(n => asDetachedNode(n)),
|
|
1159
1135
|
});
|
|
1160
1136
|
setParentPointersInDirectChildren(node);
|
|
1161
1137
|
return node;
|
|
1162
1138
|
}
|
|
1163
1139
|
|
|
1164
|
-
export function BooleanLiteralTypeAnnotation({
|
|
1165
|
-
parent,
|
|
1166
|
-
...props
|
|
1167
|
-
}: {
|
|
1140
|
+
export function BooleanLiteralTypeAnnotation(props: {
|
|
1168
1141
|
...$ReadOnly<BooleanLiteralTypeAnnotationProps>,
|
|
1169
1142
|
+parent?: ESNode,
|
|
1170
1143
|
}): DetachedNode<BooleanLiteralTypeAnnotationType> {
|
|
1171
|
-
const node = detachedProps<BooleanLiteralTypeAnnotationType>(parent, {
|
|
1144
|
+
const node = detachedProps<BooleanLiteralTypeAnnotationType>(props.parent, {
|
|
1172
1145
|
type: 'BooleanLiteralTypeAnnotation',
|
|
1173
|
-
|
|
1146
|
+
value: props.value,
|
|
1147
|
+
raw: props.raw,
|
|
1174
1148
|
});
|
|
1175
1149
|
setParentPointersInDirectChildren(node);
|
|
1176
1150
|
return node;
|
|
1177
1151
|
}
|
|
1178
1152
|
|
|
1179
|
-
export function BooleanTypeAnnotation(
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
return detachedProps<BooleanTypeAnnotationType>(parent, {
|
|
1153
|
+
export function BooleanTypeAnnotation(
|
|
1154
|
+
props: {
|
|
1155
|
+
+parent?: ESNode,
|
|
1156
|
+
} = {...null},
|
|
1157
|
+
): DetachedNode<BooleanTypeAnnotationType> {
|
|
1158
|
+
return detachedProps<BooleanTypeAnnotationType>(props.parent, {
|
|
1185
1159
|
type: 'BooleanTypeAnnotation',
|
|
1186
1160
|
});
|
|
1187
1161
|
}
|
|
1188
1162
|
|
|
1189
|
-
export function BreakStatement({
|
|
1190
|
-
parent,
|
|
1191
|
-
...props
|
|
1192
|
-
}: {
|
|
1163
|
+
export function BreakStatement(props: {
|
|
1193
1164
|
...$ReadOnly<BreakStatementProps>,
|
|
1194
1165
|
+parent?: ESNode,
|
|
1195
1166
|
}): DetachedNode<BreakStatementType> {
|
|
1196
|
-
const node = detachedProps<BreakStatementType>(parent, {
|
|
1167
|
+
const node = detachedProps<BreakStatementType>(props.parent, {
|
|
1197
1168
|
type: 'BreakStatement',
|
|
1198
|
-
|
|
1169
|
+
label: asDetachedNode(props.label),
|
|
1199
1170
|
});
|
|
1200
1171
|
setParentPointersInDirectChildren(node);
|
|
1201
1172
|
return node;
|
|
1202
1173
|
}
|
|
1203
1174
|
|
|
1204
|
-
export function CallExpression({
|
|
1205
|
-
parent,
|
|
1206
|
-
...props
|
|
1207
|
-
}: {
|
|
1175
|
+
export function CallExpression(props: {
|
|
1208
1176
|
...$ReadOnly<CallExpressionProps>,
|
|
1209
1177
|
+parent?: ESNode,
|
|
1210
1178
|
}): DetachedNode<CallExpressionType> {
|
|
1211
|
-
const node = detachedProps<CallExpressionType>(parent, {
|
|
1179
|
+
const node = detachedProps<CallExpressionType>(props.parent, {
|
|
1212
1180
|
type: 'CallExpression',
|
|
1213
|
-
|
|
1181
|
+
callee: asDetachedNode(props.callee),
|
|
1182
|
+
typeArguments: asDetachedNode(props.typeArguments),
|
|
1183
|
+
arguments: props.arguments.map(n => asDetachedNode(n)),
|
|
1214
1184
|
});
|
|
1215
1185
|
setParentPointersInDirectChildren(node);
|
|
1216
1186
|
return node;
|
|
1217
1187
|
}
|
|
1218
1188
|
|
|
1219
|
-
export function CatchClause({
|
|
1220
|
-
parent,
|
|
1221
|
-
...props
|
|
1222
|
-
}: {
|
|
1189
|
+
export function CatchClause(props: {
|
|
1223
1190
|
...$ReadOnly<CatchClauseProps>,
|
|
1224
1191
|
+parent?: ESNode,
|
|
1225
1192
|
}): DetachedNode<CatchClauseType> {
|
|
1226
|
-
const node = detachedProps<CatchClauseType>(parent, {
|
|
1193
|
+
const node = detachedProps<CatchClauseType>(props.parent, {
|
|
1227
1194
|
type: 'CatchClause',
|
|
1228
|
-
|
|
1195
|
+
param: asDetachedNode(props.param),
|
|
1196
|
+
body: asDetachedNode(props.body),
|
|
1229
1197
|
});
|
|
1230
1198
|
setParentPointersInDirectChildren(node);
|
|
1231
1199
|
return node;
|
|
1232
1200
|
}
|
|
1233
1201
|
|
|
1234
|
-
export function
|
|
1235
|
-
|
|
1236
|
-
...props
|
|
1237
|
-
}: {
|
|
1238
|
-
...$ReadOnly<ClassBodyProps>,
|
|
1202
|
+
export function ChainExpression(props: {
|
|
1203
|
+
...$ReadOnly<ChainExpressionProps>,
|
|
1239
1204
|
+parent?: ESNode,
|
|
1240
|
-
}): DetachedNode<
|
|
1241
|
-
const node = detachedProps<
|
|
1242
|
-
type: '
|
|
1243
|
-
|
|
1205
|
+
}): DetachedNode<ChainExpressionType> {
|
|
1206
|
+
const node = detachedProps<ChainExpressionType>(props.parent, {
|
|
1207
|
+
type: 'ChainExpression',
|
|
1208
|
+
expression: asDetachedNode(props.expression),
|
|
1244
1209
|
});
|
|
1245
1210
|
setParentPointersInDirectChildren(node);
|
|
1246
1211
|
return node;
|
|
1247
1212
|
}
|
|
1248
1213
|
|
|
1249
|
-
export function
|
|
1250
|
-
|
|
1251
|
-
...props
|
|
1252
|
-
}: {
|
|
1253
|
-
...$ReadOnly<ClassDeclarationProps>,
|
|
1214
|
+
export function ClassBody(props: {
|
|
1215
|
+
...$ReadOnly<ClassBodyProps>,
|
|
1254
1216
|
+parent?: ESNode,
|
|
1255
|
-
}): DetachedNode<
|
|
1256
|
-
const node = detachedProps<
|
|
1257
|
-
type: '
|
|
1258
|
-
|
|
1217
|
+
}): DetachedNode<ClassBodyType> {
|
|
1218
|
+
const node = detachedProps<ClassBodyType>(props.parent, {
|
|
1219
|
+
type: 'ClassBody',
|
|
1220
|
+
body: props.body.map(n => asDetachedNode(n)),
|
|
1259
1221
|
});
|
|
1260
1222
|
setParentPointersInDirectChildren(node);
|
|
1261
1223
|
return node;
|
|
1262
1224
|
}
|
|
1263
1225
|
|
|
1264
|
-
export function ClassExpression({
|
|
1265
|
-
parent,
|
|
1266
|
-
...props
|
|
1267
|
-
}: {
|
|
1226
|
+
export function ClassExpression(props: {
|
|
1268
1227
|
...$ReadOnly<ClassExpressionProps>,
|
|
1269
1228
|
+parent?: ESNode,
|
|
1270
1229
|
}): DetachedNode<ClassExpressionType> {
|
|
1271
|
-
const node = detachedProps<ClassExpressionType>(parent, {
|
|
1230
|
+
const node = detachedProps<ClassExpressionType>(props.parent, {
|
|
1272
1231
|
type: 'ClassExpression',
|
|
1273
|
-
|
|
1232
|
+
id: asDetachedNode(props.id),
|
|
1233
|
+
typeParameters: asDetachedNode(props.typeParameters),
|
|
1234
|
+
superClass: asDetachedNode(props.superClass),
|
|
1235
|
+
superTypeParameters: asDetachedNode(props.superTypeParameters),
|
|
1236
|
+
implements: props.implements.map(n => asDetachedNode(n)),
|
|
1237
|
+
decorators: props.decorators.map(n => asDetachedNode(n)),
|
|
1238
|
+
body: asDetachedNode(props.body),
|
|
1274
1239
|
});
|
|
1275
1240
|
setParentPointersInDirectChildren(node);
|
|
1276
1241
|
return node;
|
|
1277
1242
|
}
|
|
1278
1243
|
|
|
1279
|
-
export function ClassImplements({
|
|
1280
|
-
parent,
|
|
1281
|
-
...props
|
|
1282
|
-
}: {
|
|
1244
|
+
export function ClassImplements(props: {
|
|
1283
1245
|
...$ReadOnly<ClassImplementsProps>,
|
|
1284
1246
|
+parent?: ESNode,
|
|
1285
1247
|
}): DetachedNode<ClassImplementsType> {
|
|
1286
|
-
const node = detachedProps<ClassImplementsType>(parent, {
|
|
1248
|
+
const node = detachedProps<ClassImplementsType>(props.parent, {
|
|
1287
1249
|
type: 'ClassImplements',
|
|
1288
|
-
|
|
1250
|
+
id: asDetachedNode(props.id),
|
|
1251
|
+
typeParameters: asDetachedNode(props.typeParameters),
|
|
1289
1252
|
});
|
|
1290
1253
|
setParentPointersInDirectChildren(node);
|
|
1291
1254
|
return node;
|
|
1292
1255
|
}
|
|
1293
1256
|
|
|
1294
|
-
export function
|
|
1295
|
-
parent,
|
|
1296
|
-
...props
|
|
1297
|
-
}: {
|
|
1298
|
-
...$ReadOnly<ClassPrivatePropertyProps>,
|
|
1299
|
-
+parent?: ESNode,
|
|
1300
|
-
}): DetachedNode<ClassPrivatePropertyType> {
|
|
1301
|
-
const node = detachedProps<ClassPrivatePropertyType>(parent, {
|
|
1302
|
-
type: 'ClassPrivateProperty',
|
|
1303
|
-
...props,
|
|
1304
|
-
});
|
|
1305
|
-
setParentPointersInDirectChildren(node);
|
|
1306
|
-
return node;
|
|
1307
|
-
}
|
|
1308
|
-
|
|
1309
|
-
export function ClassProperty({
|
|
1310
|
-
parent,
|
|
1311
|
-
...props
|
|
1312
|
-
}: {
|
|
1313
|
-
...$ReadOnly<ClassPropertyProps>,
|
|
1314
|
-
+parent?: ESNode,
|
|
1315
|
-
}): DetachedNode<ClassPropertyType> {
|
|
1316
|
-
const node = detachedProps<ClassPropertyType>(parent, {
|
|
1317
|
-
type: 'ClassProperty',
|
|
1318
|
-
...props,
|
|
1319
|
-
});
|
|
1320
|
-
setParentPointersInDirectChildren(node);
|
|
1321
|
-
return node;
|
|
1322
|
-
}
|
|
1323
|
-
|
|
1324
|
-
export function ConditionalExpression({
|
|
1325
|
-
parent,
|
|
1326
|
-
...props
|
|
1327
|
-
}: {
|
|
1257
|
+
export function ConditionalExpression(props: {
|
|
1328
1258
|
...$ReadOnly<ConditionalExpressionProps>,
|
|
1329
1259
|
+parent?: ESNode,
|
|
1330
1260
|
}): DetachedNode<ConditionalExpressionType> {
|
|
1331
|
-
const node = detachedProps<ConditionalExpressionType>(parent, {
|
|
1261
|
+
const node = detachedProps<ConditionalExpressionType>(props.parent, {
|
|
1332
1262
|
type: 'ConditionalExpression',
|
|
1333
|
-
|
|
1263
|
+
test: asDetachedNode(props.test),
|
|
1264
|
+
alternate: asDetachedNode(props.alternate),
|
|
1265
|
+
consequent: asDetachedNode(props.consequent),
|
|
1334
1266
|
});
|
|
1335
1267
|
setParentPointersInDirectChildren(node);
|
|
1336
1268
|
return node;
|
|
1337
1269
|
}
|
|
1338
1270
|
|
|
1339
|
-
export function ContinueStatement({
|
|
1340
|
-
parent,
|
|
1341
|
-
...props
|
|
1342
|
-
}: {
|
|
1271
|
+
export function ContinueStatement(props: {
|
|
1343
1272
|
...$ReadOnly<ContinueStatementProps>,
|
|
1344
1273
|
+parent?: ESNode,
|
|
1345
1274
|
}): DetachedNode<ContinueStatementType> {
|
|
1346
|
-
const node = detachedProps<ContinueStatementType>(parent, {
|
|
1275
|
+
const node = detachedProps<ContinueStatementType>(props.parent, {
|
|
1347
1276
|
type: 'ContinueStatement',
|
|
1348
|
-
|
|
1277
|
+
label: asDetachedNode(props.label),
|
|
1349
1278
|
});
|
|
1350
1279
|
setParentPointersInDirectChildren(node);
|
|
1351
1280
|
return node;
|
|
1352
1281
|
}
|
|
1353
1282
|
|
|
1354
|
-
export function DebuggerStatement(
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
return detachedProps<DebuggerStatementType>(parent, {
|
|
1283
|
+
export function DebuggerStatement(
|
|
1284
|
+
props: {
|
|
1285
|
+
+parent?: ESNode,
|
|
1286
|
+
} = {...null},
|
|
1287
|
+
): DetachedNode<DebuggerStatementType> {
|
|
1288
|
+
return detachedProps<DebuggerStatementType>(props.parent, {
|
|
1360
1289
|
type: 'DebuggerStatement',
|
|
1361
1290
|
});
|
|
1362
1291
|
}
|
|
1363
1292
|
|
|
1364
|
-
export function DeclareClass({
|
|
1365
|
-
parent,
|
|
1366
|
-
...props
|
|
1367
|
-
}: {
|
|
1293
|
+
export function DeclareClass(props: {
|
|
1368
1294
|
...$ReadOnly<DeclareClassProps>,
|
|
1369
1295
|
+parent?: ESNode,
|
|
1370
1296
|
}): DetachedNode<DeclareClassType> {
|
|
1371
|
-
const node = detachedProps<DeclareClassType>(parent, {
|
|
1297
|
+
const node = detachedProps<DeclareClassType>(props.parent, {
|
|
1372
1298
|
type: 'DeclareClass',
|
|
1373
|
-
|
|
1299
|
+
id: asDetachedNode(props.id),
|
|
1300
|
+
typeParameters: asDetachedNode(props.typeParameters),
|
|
1301
|
+
extends: props.extends.map(n => asDetachedNode(n)),
|
|
1302
|
+
implements: props.implements.map(n => asDetachedNode(n)),
|
|
1303
|
+
mixins: props.mixins.map(n => asDetachedNode(n)),
|
|
1304
|
+
body: asDetachedNode(props.body),
|
|
1374
1305
|
});
|
|
1375
1306
|
setParentPointersInDirectChildren(node);
|
|
1376
1307
|
return node;
|
|
1377
1308
|
}
|
|
1378
1309
|
|
|
1379
|
-
export function DeclaredPredicate({
|
|
1380
|
-
parent,
|
|
1381
|
-
...props
|
|
1382
|
-
}: {
|
|
1310
|
+
export function DeclaredPredicate(props: {
|
|
1383
1311
|
...$ReadOnly<DeclaredPredicateProps>,
|
|
1384
1312
|
+parent?: ESNode,
|
|
1385
1313
|
}): DetachedNode<DeclaredPredicateType> {
|
|
1386
|
-
const node = detachedProps<DeclaredPredicateType>(parent, {
|
|
1314
|
+
const node = detachedProps<DeclaredPredicateType>(props.parent, {
|
|
1387
1315
|
type: 'DeclaredPredicate',
|
|
1388
|
-
|
|
1316
|
+
value: asDetachedNode(props.value),
|
|
1389
1317
|
});
|
|
1390
1318
|
setParentPointersInDirectChildren(node);
|
|
1391
1319
|
return node;
|
|
1392
1320
|
}
|
|
1393
1321
|
|
|
1394
|
-
export function DeclareExportAllDeclaration({
|
|
1395
|
-
parent,
|
|
1396
|
-
...props
|
|
1397
|
-
}: {
|
|
1322
|
+
export function DeclareExportAllDeclaration(props: {
|
|
1398
1323
|
...$ReadOnly<DeclareExportAllDeclarationProps>,
|
|
1399
1324
|
+parent?: ESNode,
|
|
1400
1325
|
}): DetachedNode<DeclareExportAllDeclarationType> {
|
|
1401
|
-
const node = detachedProps<DeclareExportAllDeclarationType>(parent, {
|
|
1326
|
+
const node = detachedProps<DeclareExportAllDeclarationType>(props.parent, {
|
|
1402
1327
|
type: 'DeclareExportAllDeclaration',
|
|
1403
|
-
|
|
1328
|
+
source: asDetachedNode(props.source),
|
|
1404
1329
|
});
|
|
1405
1330
|
setParentPointersInDirectChildren(node);
|
|
1406
1331
|
return node;
|
|
1407
1332
|
}
|
|
1408
1333
|
|
|
1409
|
-
export function DeclareExportDeclaration({
|
|
1410
|
-
parent,
|
|
1411
|
-
...props
|
|
1412
|
-
}: {
|
|
1334
|
+
export function DeclareExportDeclaration(props: {
|
|
1413
1335
|
...$ReadOnly<DeclareExportDeclarationProps>,
|
|
1414
1336
|
+parent?: ESNode,
|
|
1415
1337
|
}): DetachedNode<DeclareExportDeclarationType> {
|
|
1416
|
-
const node = detachedProps<DeclareExportDeclarationType>(parent, {
|
|
1338
|
+
const node = detachedProps<DeclareExportDeclarationType>(props.parent, {
|
|
1417
1339
|
type: 'DeclareExportDeclaration',
|
|
1418
|
-
|
|
1340
|
+
declaration: asDetachedNode(props.declaration),
|
|
1341
|
+
specifiers: props.specifiers.map(n => asDetachedNode(n)),
|
|
1342
|
+
source: asDetachedNode(props.source),
|
|
1343
|
+
default: props.default,
|
|
1419
1344
|
});
|
|
1420
1345
|
setParentPointersInDirectChildren(node);
|
|
1421
1346
|
return node;
|
|
1422
1347
|
}
|
|
1423
1348
|
|
|
1424
|
-
export function DeclareFunction({
|
|
1425
|
-
parent,
|
|
1426
|
-
...props
|
|
1427
|
-
}: {
|
|
1349
|
+
export function DeclareFunction(props: {
|
|
1428
1350
|
...$ReadOnly<DeclareFunctionProps>,
|
|
1429
1351
|
+parent?: ESNode,
|
|
1430
1352
|
}): DetachedNode<DeclareFunctionType> {
|
|
1431
|
-
const node = detachedProps<DeclareFunctionType>(parent, {
|
|
1353
|
+
const node = detachedProps<DeclareFunctionType>(props.parent, {
|
|
1432
1354
|
type: 'DeclareFunction',
|
|
1433
|
-
|
|
1355
|
+
id: asDetachedNode(props.id),
|
|
1356
|
+
predicate: asDetachedNode(props.predicate),
|
|
1434
1357
|
});
|
|
1435
1358
|
setParentPointersInDirectChildren(node);
|
|
1436
1359
|
return node;
|
|
1437
1360
|
}
|
|
1438
1361
|
|
|
1439
|
-
export function DeclareInterface({
|
|
1440
|
-
parent,
|
|
1441
|
-
...props
|
|
1442
|
-
}: {
|
|
1362
|
+
export function DeclareInterface(props: {
|
|
1443
1363
|
...$ReadOnly<DeclareInterfaceProps>,
|
|
1444
1364
|
+parent?: ESNode,
|
|
1445
1365
|
}): DetachedNode<DeclareInterfaceType> {
|
|
1446
|
-
const node = detachedProps<DeclareInterfaceType>(parent, {
|
|
1366
|
+
const node = detachedProps<DeclareInterfaceType>(props.parent, {
|
|
1447
1367
|
type: 'DeclareInterface',
|
|
1448
|
-
|
|
1368
|
+
id: asDetachedNode(props.id),
|
|
1369
|
+
typeParameters: asDetachedNode(props.typeParameters),
|
|
1370
|
+
extends: props.extends.map(n => asDetachedNode(n)),
|
|
1371
|
+
body: asDetachedNode(props.body),
|
|
1449
1372
|
});
|
|
1450
1373
|
setParentPointersInDirectChildren(node);
|
|
1451
1374
|
return node;
|
|
1452
1375
|
}
|
|
1453
1376
|
|
|
1454
|
-
export function DeclareModule({
|
|
1455
|
-
parent,
|
|
1456
|
-
...props
|
|
1457
|
-
}: {
|
|
1377
|
+
export function DeclareModule(props: {
|
|
1458
1378
|
...$ReadOnly<DeclareModuleProps>,
|
|
1459
1379
|
+parent?: ESNode,
|
|
1460
1380
|
}): DetachedNode<DeclareModuleType> {
|
|
1461
|
-
const node = detachedProps<DeclareModuleType>(parent, {
|
|
1381
|
+
const node = detachedProps<DeclareModuleType>(props.parent, {
|
|
1462
1382
|
type: 'DeclareModule',
|
|
1463
|
-
|
|
1383
|
+
id: asDetachedNode(props.id),
|
|
1384
|
+
body: asDetachedNode(props.body),
|
|
1385
|
+
kind: props.kind,
|
|
1464
1386
|
});
|
|
1465
1387
|
setParentPointersInDirectChildren(node);
|
|
1466
1388
|
return node;
|
|
1467
1389
|
}
|
|
1468
1390
|
|
|
1469
|
-
export function DeclareModuleExports({
|
|
1470
|
-
parent,
|
|
1471
|
-
...props
|
|
1472
|
-
}: {
|
|
1391
|
+
export function DeclareModuleExports(props: {
|
|
1473
1392
|
...$ReadOnly<DeclareModuleExportsProps>,
|
|
1474
1393
|
+parent?: ESNode,
|
|
1475
1394
|
}): DetachedNode<DeclareModuleExportsType> {
|
|
1476
|
-
const node = detachedProps<DeclareModuleExportsType>(parent, {
|
|
1395
|
+
const node = detachedProps<DeclareModuleExportsType>(props.parent, {
|
|
1477
1396
|
type: 'DeclareModuleExports',
|
|
1478
|
-
|
|
1397
|
+
typeAnnotation: asDetachedNode(props.typeAnnotation),
|
|
1479
1398
|
});
|
|
1480
1399
|
setParentPointersInDirectChildren(node);
|
|
1481
1400
|
return node;
|
|
1482
1401
|
}
|
|
1483
1402
|
|
|
1484
|
-
export function DeclareOpaqueType({
|
|
1485
|
-
parent,
|
|
1486
|
-
...props
|
|
1487
|
-
}: {
|
|
1403
|
+
export function DeclareOpaqueType(props: {
|
|
1488
1404
|
...$ReadOnly<DeclareOpaqueTypeProps>,
|
|
1489
1405
|
+parent?: ESNode,
|
|
1490
1406
|
}): DetachedNode<DeclareOpaqueTypeType> {
|
|
1491
|
-
const node = detachedProps<DeclareOpaqueTypeType>(parent, {
|
|
1407
|
+
const node = detachedProps<DeclareOpaqueTypeType>(props.parent, {
|
|
1492
1408
|
type: 'DeclareOpaqueType',
|
|
1493
|
-
|
|
1409
|
+
id: asDetachedNode(props.id),
|
|
1410
|
+
typeParameters: asDetachedNode(props.typeParameters),
|
|
1411
|
+
impltype: asDetachedNode(props.impltype),
|
|
1412
|
+
supertype: asDetachedNode(props.supertype),
|
|
1494
1413
|
});
|
|
1495
1414
|
setParentPointersInDirectChildren(node);
|
|
1496
1415
|
return node;
|
|
1497
1416
|
}
|
|
1498
1417
|
|
|
1499
|
-
export function DeclareTypeAlias({
|
|
1500
|
-
parent,
|
|
1501
|
-
...props
|
|
1502
|
-
}: {
|
|
1418
|
+
export function DeclareTypeAlias(props: {
|
|
1503
1419
|
...$ReadOnly<DeclareTypeAliasProps>,
|
|
1504
1420
|
+parent?: ESNode,
|
|
1505
1421
|
}): DetachedNode<DeclareTypeAliasType> {
|
|
1506
|
-
const node = detachedProps<DeclareTypeAliasType>(parent, {
|
|
1422
|
+
const node = detachedProps<DeclareTypeAliasType>(props.parent, {
|
|
1507
1423
|
type: 'DeclareTypeAlias',
|
|
1508
|
-
|
|
1424
|
+
id: asDetachedNode(props.id),
|
|
1425
|
+
typeParameters: asDetachedNode(props.typeParameters),
|
|
1426
|
+
right: asDetachedNode(props.right),
|
|
1509
1427
|
});
|
|
1510
1428
|
setParentPointersInDirectChildren(node);
|
|
1511
1429
|
return node;
|
|
1512
1430
|
}
|
|
1513
1431
|
|
|
1514
|
-
export function DeclareVariable({
|
|
1515
|
-
parent,
|
|
1516
|
-
...props
|
|
1517
|
-
}: {
|
|
1432
|
+
export function DeclareVariable(props: {
|
|
1518
1433
|
...$ReadOnly<DeclareVariableProps>,
|
|
1519
1434
|
+parent?: ESNode,
|
|
1520
1435
|
}): DetachedNode<DeclareVariableType> {
|
|
1521
|
-
const node = detachedProps<DeclareVariableType>(parent, {
|
|
1436
|
+
const node = detachedProps<DeclareVariableType>(props.parent, {
|
|
1522
1437
|
type: 'DeclareVariable',
|
|
1523
|
-
|
|
1438
|
+
id: asDetachedNode(props.id),
|
|
1524
1439
|
});
|
|
1525
1440
|
setParentPointersInDirectChildren(node);
|
|
1526
1441
|
return node;
|
|
1527
1442
|
}
|
|
1528
1443
|
|
|
1529
|
-
export function DoWhileStatement({
|
|
1530
|
-
parent,
|
|
1531
|
-
...props
|
|
1532
|
-
}: {
|
|
1444
|
+
export function DoWhileStatement(props: {
|
|
1533
1445
|
...$ReadOnly<DoWhileStatementProps>,
|
|
1534
1446
|
+parent?: ESNode,
|
|
1535
1447
|
}): DetachedNode<DoWhileStatementType> {
|
|
1536
|
-
const node = detachedProps<DoWhileStatementType>(parent, {
|
|
1448
|
+
const node = detachedProps<DoWhileStatementType>(props.parent, {
|
|
1537
1449
|
type: 'DoWhileStatement',
|
|
1538
|
-
|
|
1450
|
+
body: asDetachedNode(props.body),
|
|
1451
|
+
test: asDetachedNode(props.test),
|
|
1539
1452
|
});
|
|
1540
1453
|
setParentPointersInDirectChildren(node);
|
|
1541
1454
|
return node;
|
|
1542
1455
|
}
|
|
1543
1456
|
|
|
1544
|
-
export function EmptyStatement(
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
return detachedProps<EmptyStatementType>(parent, {
|
|
1457
|
+
export function EmptyStatement(
|
|
1458
|
+
props: {
|
|
1459
|
+
+parent?: ESNode,
|
|
1460
|
+
} = {...null},
|
|
1461
|
+
): DetachedNode<EmptyStatementType> {
|
|
1462
|
+
return detachedProps<EmptyStatementType>(props.parent, {
|
|
1550
1463
|
type: 'EmptyStatement',
|
|
1551
1464
|
});
|
|
1552
1465
|
}
|
|
1553
1466
|
|
|
1554
|
-
export function EmptyTypeAnnotation(
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
return detachedProps<EmptyTypeAnnotationType>(parent, {
|
|
1467
|
+
export function EmptyTypeAnnotation(
|
|
1468
|
+
props: {
|
|
1469
|
+
+parent?: ESNode,
|
|
1470
|
+
} = {...null},
|
|
1471
|
+
): DetachedNode<EmptyTypeAnnotationType> {
|
|
1472
|
+
return detachedProps<EmptyTypeAnnotationType>(props.parent, {
|
|
1560
1473
|
type: 'EmptyTypeAnnotation',
|
|
1561
1474
|
});
|
|
1562
1475
|
}
|
|
1563
1476
|
|
|
1564
|
-
export function EnumBooleanBody({
|
|
1565
|
-
parent,
|
|
1566
|
-
...props
|
|
1567
|
-
}: {
|
|
1477
|
+
export function EnumBooleanBody(props: {
|
|
1568
1478
|
...$ReadOnly<EnumBooleanBodyProps>,
|
|
1569
1479
|
+parent?: ESNode,
|
|
1570
1480
|
}): DetachedNode<EnumBooleanBodyType> {
|
|
1571
|
-
const node = detachedProps<EnumBooleanBodyType>(parent, {
|
|
1481
|
+
const node = detachedProps<EnumBooleanBodyType>(props.parent, {
|
|
1572
1482
|
type: 'EnumBooleanBody',
|
|
1573
|
-
|
|
1483
|
+
members: props.members.map(n => asDetachedNode(n)),
|
|
1484
|
+
explicitType: props.explicitType,
|
|
1485
|
+
hasUnknownMembers: props.hasUnknownMembers,
|
|
1574
1486
|
});
|
|
1575
1487
|
setParentPointersInDirectChildren(node);
|
|
1576
1488
|
return node;
|
|
1577
1489
|
}
|
|
1578
1490
|
|
|
1579
|
-
export function EnumBooleanMember({
|
|
1580
|
-
parent,
|
|
1581
|
-
...props
|
|
1582
|
-
}: {
|
|
1491
|
+
export function EnumBooleanMember(props: {
|
|
1583
1492
|
...$ReadOnly<EnumBooleanMemberProps>,
|
|
1584
1493
|
+parent?: ESNode,
|
|
1585
1494
|
}): DetachedNode<EnumBooleanMemberType> {
|
|
1586
|
-
const node = detachedProps<EnumBooleanMemberType>(parent, {
|
|
1495
|
+
const node = detachedProps<EnumBooleanMemberType>(props.parent, {
|
|
1587
1496
|
type: 'EnumBooleanMember',
|
|
1588
|
-
|
|
1497
|
+
id: asDetachedNode(props.id),
|
|
1498
|
+
init: asDetachedNode(props.init),
|
|
1589
1499
|
});
|
|
1590
1500
|
setParentPointersInDirectChildren(node);
|
|
1591
1501
|
return node;
|
|
1592
1502
|
}
|
|
1593
1503
|
|
|
1594
|
-
export function EnumDeclaration({
|
|
1595
|
-
parent,
|
|
1596
|
-
...props
|
|
1597
|
-
}: {
|
|
1504
|
+
export function EnumDeclaration(props: {
|
|
1598
1505
|
...$ReadOnly<EnumDeclarationProps>,
|
|
1599
1506
|
+parent?: ESNode,
|
|
1600
1507
|
}): DetachedNode<EnumDeclarationType> {
|
|
1601
|
-
const node = detachedProps<EnumDeclarationType>(parent, {
|
|
1508
|
+
const node = detachedProps<EnumDeclarationType>(props.parent, {
|
|
1602
1509
|
type: 'EnumDeclaration',
|
|
1603
|
-
|
|
1510
|
+
id: asDetachedNode(props.id),
|
|
1511
|
+
body: asDetachedNode(props.body),
|
|
1604
1512
|
});
|
|
1605
1513
|
setParentPointersInDirectChildren(node);
|
|
1606
1514
|
return node;
|
|
1607
1515
|
}
|
|
1608
1516
|
|
|
1609
|
-
export function EnumDefaultedMember({
|
|
1610
|
-
parent,
|
|
1611
|
-
...props
|
|
1612
|
-
}: {
|
|
1517
|
+
export function EnumDefaultedMember(props: {
|
|
1613
1518
|
...$ReadOnly<EnumDefaultedMemberProps>,
|
|
1614
1519
|
+parent?: ESNode,
|
|
1615
1520
|
}): DetachedNode<EnumDefaultedMemberType> {
|
|
1616
|
-
const node = detachedProps<EnumDefaultedMemberType>(parent, {
|
|
1521
|
+
const node = detachedProps<EnumDefaultedMemberType>(props.parent, {
|
|
1617
1522
|
type: 'EnumDefaultedMember',
|
|
1618
|
-
|
|
1523
|
+
id: asDetachedNode(props.id),
|
|
1619
1524
|
});
|
|
1620
1525
|
setParentPointersInDirectChildren(node);
|
|
1621
1526
|
return node;
|
|
1622
1527
|
}
|
|
1623
1528
|
|
|
1624
|
-
export function EnumNumberBody({
|
|
1625
|
-
parent,
|
|
1626
|
-
...props
|
|
1627
|
-
}: {
|
|
1529
|
+
export function EnumNumberBody(props: {
|
|
1628
1530
|
...$ReadOnly<EnumNumberBodyProps>,
|
|
1629
1531
|
+parent?: ESNode,
|
|
1630
1532
|
}): DetachedNode<EnumNumberBodyType> {
|
|
1631
|
-
const node = detachedProps<EnumNumberBodyType>(parent, {
|
|
1533
|
+
const node = detachedProps<EnumNumberBodyType>(props.parent, {
|
|
1632
1534
|
type: 'EnumNumberBody',
|
|
1633
|
-
|
|
1535
|
+
members: props.members.map(n => asDetachedNode(n)),
|
|
1536
|
+
explicitType: props.explicitType,
|
|
1537
|
+
hasUnknownMembers: props.hasUnknownMembers,
|
|
1634
1538
|
});
|
|
1635
1539
|
setParentPointersInDirectChildren(node);
|
|
1636
1540
|
return node;
|
|
1637
1541
|
}
|
|
1638
1542
|
|
|
1639
|
-
export function EnumNumberMember({
|
|
1640
|
-
parent,
|
|
1641
|
-
...props
|
|
1642
|
-
}: {
|
|
1543
|
+
export function EnumNumberMember(props: {
|
|
1643
1544
|
...$ReadOnly<EnumNumberMemberProps>,
|
|
1644
1545
|
+parent?: ESNode,
|
|
1645
1546
|
}): DetachedNode<EnumNumberMemberType> {
|
|
1646
|
-
const node = detachedProps<EnumNumberMemberType>(parent, {
|
|
1547
|
+
const node = detachedProps<EnumNumberMemberType>(props.parent, {
|
|
1647
1548
|
type: 'EnumNumberMember',
|
|
1648
|
-
|
|
1549
|
+
id: asDetachedNode(props.id),
|
|
1550
|
+
init: asDetachedNode(props.init),
|
|
1649
1551
|
});
|
|
1650
1552
|
setParentPointersInDirectChildren(node);
|
|
1651
1553
|
return node;
|
|
1652
1554
|
}
|
|
1653
1555
|
|
|
1654
|
-
export function EnumStringBody({
|
|
1655
|
-
parent,
|
|
1656
|
-
...props
|
|
1657
|
-
}: {
|
|
1556
|
+
export function EnumStringBody(props: {
|
|
1658
1557
|
...$ReadOnly<EnumStringBodyProps>,
|
|
1659
1558
|
+parent?: ESNode,
|
|
1660
1559
|
}): DetachedNode<EnumStringBodyType> {
|
|
1661
|
-
const node = detachedProps<EnumStringBodyType>(parent, {
|
|
1560
|
+
const node = detachedProps<EnumStringBodyType>(props.parent, {
|
|
1662
1561
|
type: 'EnumStringBody',
|
|
1663
|
-
|
|
1562
|
+
members: props.members.map(n => asDetachedNode(n)),
|
|
1563
|
+
explicitType: props.explicitType,
|
|
1564
|
+
hasUnknownMembers: props.hasUnknownMembers,
|
|
1664
1565
|
});
|
|
1665
1566
|
setParentPointersInDirectChildren(node);
|
|
1666
1567
|
return node;
|
|
1667
1568
|
}
|
|
1668
1569
|
|
|
1669
|
-
export function EnumStringMember({
|
|
1670
|
-
parent,
|
|
1671
|
-
...props
|
|
1672
|
-
}: {
|
|
1570
|
+
export function EnumStringMember(props: {
|
|
1673
1571
|
...$ReadOnly<EnumStringMemberProps>,
|
|
1674
1572
|
+parent?: ESNode,
|
|
1675
1573
|
}): DetachedNode<EnumStringMemberType> {
|
|
1676
|
-
const node = detachedProps<EnumStringMemberType>(parent, {
|
|
1574
|
+
const node = detachedProps<EnumStringMemberType>(props.parent, {
|
|
1677
1575
|
type: 'EnumStringMember',
|
|
1678
|
-
|
|
1576
|
+
id: asDetachedNode(props.id),
|
|
1577
|
+
init: asDetachedNode(props.init),
|
|
1679
1578
|
});
|
|
1680
1579
|
setParentPointersInDirectChildren(node);
|
|
1681
1580
|
return node;
|
|
1682
1581
|
}
|
|
1683
1582
|
|
|
1684
|
-
export function EnumSymbolBody({
|
|
1685
|
-
parent,
|
|
1686
|
-
...props
|
|
1687
|
-
}: {
|
|
1583
|
+
export function EnumSymbolBody(props: {
|
|
1688
1584
|
...$ReadOnly<EnumSymbolBodyProps>,
|
|
1689
1585
|
+parent?: ESNode,
|
|
1690
1586
|
}): DetachedNode<EnumSymbolBodyType> {
|
|
1691
|
-
const node = detachedProps<EnumSymbolBodyType>(parent, {
|
|
1587
|
+
const node = detachedProps<EnumSymbolBodyType>(props.parent, {
|
|
1692
1588
|
type: 'EnumSymbolBody',
|
|
1693
|
-
|
|
1589
|
+
members: props.members.map(n => asDetachedNode(n)),
|
|
1590
|
+
hasUnknownMembers: props.hasUnknownMembers,
|
|
1694
1591
|
});
|
|
1695
1592
|
setParentPointersInDirectChildren(node);
|
|
1696
1593
|
return node;
|
|
1697
1594
|
}
|
|
1698
1595
|
|
|
1699
|
-
export function ExistsTypeAnnotation(
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
return detachedProps<ExistsTypeAnnotationType>(parent, {
|
|
1596
|
+
export function ExistsTypeAnnotation(
|
|
1597
|
+
props: {
|
|
1598
|
+
+parent?: ESNode,
|
|
1599
|
+
} = {...null},
|
|
1600
|
+
): DetachedNode<ExistsTypeAnnotationType> {
|
|
1601
|
+
return detachedProps<ExistsTypeAnnotationType>(props.parent, {
|
|
1705
1602
|
type: 'ExistsTypeAnnotation',
|
|
1706
1603
|
});
|
|
1707
1604
|
}
|
|
1708
1605
|
|
|
1709
|
-
export function ExportAllDeclaration({
|
|
1710
|
-
parent,
|
|
1711
|
-
...props
|
|
1712
|
-
}: {
|
|
1606
|
+
export function ExportAllDeclaration(props: {
|
|
1713
1607
|
...$ReadOnly<ExportAllDeclarationProps>,
|
|
1714
1608
|
+parent?: ESNode,
|
|
1715
1609
|
}): DetachedNode<ExportAllDeclarationType> {
|
|
1716
|
-
const node = detachedProps<ExportAllDeclarationType>(parent, {
|
|
1610
|
+
const node = detachedProps<ExportAllDeclarationType>(props.parent, {
|
|
1717
1611
|
type: 'ExportAllDeclaration',
|
|
1718
|
-
|
|
1612
|
+
exported: asDetachedNode(props.exported),
|
|
1613
|
+
source: asDetachedNode(props.source),
|
|
1614
|
+
exportKind: props.exportKind,
|
|
1719
1615
|
});
|
|
1720
1616
|
setParentPointersInDirectChildren(node);
|
|
1721
1617
|
return node;
|
|
1722
1618
|
}
|
|
1723
1619
|
|
|
1724
|
-
export function ExportDefaultDeclaration({
|
|
1725
|
-
parent,
|
|
1726
|
-
...props
|
|
1727
|
-
}: {
|
|
1620
|
+
export function ExportDefaultDeclaration(props: {
|
|
1728
1621
|
...$ReadOnly<ExportDefaultDeclarationProps>,
|
|
1729
1622
|
+parent?: ESNode,
|
|
1730
1623
|
}): DetachedNode<ExportDefaultDeclarationType> {
|
|
1731
|
-
const node = detachedProps<ExportDefaultDeclarationType>(parent, {
|
|
1624
|
+
const node = detachedProps<ExportDefaultDeclarationType>(props.parent, {
|
|
1732
1625
|
type: 'ExportDefaultDeclaration',
|
|
1733
|
-
|
|
1626
|
+
declaration: asDetachedNode(props.declaration),
|
|
1734
1627
|
});
|
|
1735
1628
|
setParentPointersInDirectChildren(node);
|
|
1736
1629
|
return node;
|
|
1737
1630
|
}
|
|
1738
1631
|
|
|
1739
|
-
export function ExportNamedDeclaration({
|
|
1740
|
-
parent,
|
|
1741
|
-
...props
|
|
1742
|
-
}: {
|
|
1632
|
+
export function ExportNamedDeclaration(props: {
|
|
1743
1633
|
...$ReadOnly<ExportNamedDeclarationProps>,
|
|
1744
1634
|
+parent?: ESNode,
|
|
1745
1635
|
}): DetachedNode<ExportNamedDeclarationType> {
|
|
1746
|
-
const node = detachedProps<ExportNamedDeclarationType>(parent, {
|
|
1636
|
+
const node = detachedProps<ExportNamedDeclarationType>(props.parent, {
|
|
1747
1637
|
type: 'ExportNamedDeclaration',
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
}
|
|
1753
|
-
|
|
1754
|
-
export function ExportNamespaceSpecifier({
|
|
1755
|
-
parent,
|
|
1756
|
-
...props
|
|
1757
|
-
}: {
|
|
1758
|
-
...$ReadOnly<ExportNamespaceSpecifierProps>,
|
|
1759
|
-
+parent?: ESNode,
|
|
1760
|
-
}): DetachedNode<ExportNamespaceSpecifierType> {
|
|
1761
|
-
const node = detachedProps<ExportNamespaceSpecifierType>(parent, {
|
|
1762
|
-
type: 'ExportNamespaceSpecifier',
|
|
1763
|
-
...props,
|
|
1638
|
+
declaration: asDetachedNode(props.declaration),
|
|
1639
|
+
specifiers: props.specifiers.map(n => asDetachedNode(n)),
|
|
1640
|
+
source: asDetachedNode(props.source),
|
|
1641
|
+
exportKind: props.exportKind,
|
|
1764
1642
|
});
|
|
1765
1643
|
setParentPointersInDirectChildren(node);
|
|
1766
1644
|
return node;
|
|
1767
1645
|
}
|
|
1768
1646
|
|
|
1769
|
-
export function ExportSpecifier({
|
|
1770
|
-
parent,
|
|
1771
|
-
...props
|
|
1772
|
-
}: {
|
|
1647
|
+
export function ExportSpecifier(props: {
|
|
1773
1648
|
...$ReadOnly<ExportSpecifierProps>,
|
|
1774
1649
|
+parent?: ESNode,
|
|
1775
1650
|
}): DetachedNode<ExportSpecifierType> {
|
|
1776
|
-
const node = detachedProps<ExportSpecifierType>(parent, {
|
|
1651
|
+
const node = detachedProps<ExportSpecifierType>(props.parent, {
|
|
1777
1652
|
type: 'ExportSpecifier',
|
|
1778
|
-
|
|
1653
|
+
exported: asDetachedNode(props.exported),
|
|
1654
|
+
local: asDetachedNode(props.local),
|
|
1779
1655
|
});
|
|
1780
1656
|
setParentPointersInDirectChildren(node);
|
|
1781
1657
|
return node;
|
|
1782
1658
|
}
|
|
1783
1659
|
|
|
1784
|
-
export function ExpressionStatement({
|
|
1785
|
-
parent,
|
|
1786
|
-
...props
|
|
1787
|
-
}: {
|
|
1660
|
+
export function ExpressionStatement(props: {
|
|
1788
1661
|
...$ReadOnly<ExpressionStatementProps>,
|
|
1789
1662
|
+parent?: ESNode,
|
|
1790
1663
|
}): DetachedNode<ExpressionStatementType> {
|
|
1791
|
-
const node = detachedProps<ExpressionStatementType>(parent, {
|
|
1664
|
+
const node = detachedProps<ExpressionStatementType>(props.parent, {
|
|
1792
1665
|
type: 'ExpressionStatement',
|
|
1793
|
-
|
|
1666
|
+
expression: asDetachedNode(props.expression),
|
|
1667
|
+
directive: props.directive,
|
|
1794
1668
|
});
|
|
1795
1669
|
setParentPointersInDirectChildren(node);
|
|
1796
1670
|
return node;
|
|
1797
1671
|
}
|
|
1798
1672
|
|
|
1799
|
-
export function ForInStatement({
|
|
1800
|
-
parent,
|
|
1801
|
-
...props
|
|
1802
|
-
}: {
|
|
1673
|
+
export function ForInStatement(props: {
|
|
1803
1674
|
...$ReadOnly<ForInStatementProps>,
|
|
1804
1675
|
+parent?: ESNode,
|
|
1805
1676
|
}): DetachedNode<ForInStatementType> {
|
|
1806
|
-
const node = detachedProps<ForInStatementType>(parent, {
|
|
1677
|
+
const node = detachedProps<ForInStatementType>(props.parent, {
|
|
1807
1678
|
type: 'ForInStatement',
|
|
1808
|
-
|
|
1679
|
+
left: asDetachedNode(props.left),
|
|
1680
|
+
right: asDetachedNode(props.right),
|
|
1681
|
+
body: asDetachedNode(props.body),
|
|
1809
1682
|
});
|
|
1810
1683
|
setParentPointersInDirectChildren(node);
|
|
1811
1684
|
return node;
|
|
1812
1685
|
}
|
|
1813
1686
|
|
|
1814
|
-
export function ForOfStatement({
|
|
1815
|
-
parent,
|
|
1816
|
-
...props
|
|
1817
|
-
}: {
|
|
1687
|
+
export function ForOfStatement(props: {
|
|
1818
1688
|
...$ReadOnly<ForOfStatementProps>,
|
|
1819
1689
|
+parent?: ESNode,
|
|
1820
1690
|
}): DetachedNode<ForOfStatementType> {
|
|
1821
|
-
const node = detachedProps<ForOfStatementType>(parent, {
|
|
1691
|
+
const node = detachedProps<ForOfStatementType>(props.parent, {
|
|
1822
1692
|
type: 'ForOfStatement',
|
|
1823
|
-
|
|
1693
|
+
left: asDetachedNode(props.left),
|
|
1694
|
+
right: asDetachedNode(props.right),
|
|
1695
|
+
body: asDetachedNode(props.body),
|
|
1696
|
+
await: props.await,
|
|
1824
1697
|
});
|
|
1825
1698
|
setParentPointersInDirectChildren(node);
|
|
1826
1699
|
return node;
|
|
1827
1700
|
}
|
|
1828
1701
|
|
|
1829
|
-
export function ForStatement({
|
|
1830
|
-
parent,
|
|
1831
|
-
...props
|
|
1832
|
-
}: {
|
|
1702
|
+
export function ForStatement(props: {
|
|
1833
1703
|
...$ReadOnly<ForStatementProps>,
|
|
1834
1704
|
+parent?: ESNode,
|
|
1835
1705
|
}): DetachedNode<ForStatementType> {
|
|
1836
|
-
const node = detachedProps<ForStatementType>(parent, {
|
|
1706
|
+
const node = detachedProps<ForStatementType>(props.parent, {
|
|
1837
1707
|
type: 'ForStatement',
|
|
1838
|
-
|
|
1708
|
+
init: asDetachedNode(props.init),
|
|
1709
|
+
test: asDetachedNode(props.test),
|
|
1710
|
+
update: asDetachedNode(props.update),
|
|
1711
|
+
body: asDetachedNode(props.body),
|
|
1839
1712
|
});
|
|
1840
1713
|
setParentPointersInDirectChildren(node);
|
|
1841
1714
|
return node;
|
|
1842
1715
|
}
|
|
1843
1716
|
|
|
1844
|
-
export function FunctionDeclaration({
|
|
1845
|
-
parent,
|
|
1846
|
-
...props
|
|
1847
|
-
}: {
|
|
1717
|
+
export function FunctionDeclaration(props: {
|
|
1848
1718
|
...$ReadOnly<FunctionDeclarationProps>,
|
|
1849
1719
|
+parent?: ESNode,
|
|
1850
1720
|
}): DetachedNode<FunctionDeclarationType> {
|
|
1851
|
-
const node = detachedProps<FunctionDeclarationType>(parent, {
|
|
1721
|
+
const node = detachedProps<FunctionDeclarationType>(props.parent, {
|
|
1852
1722
|
type: 'FunctionDeclaration',
|
|
1853
|
-
|
|
1723
|
+
id: asDetachedNode(props.id),
|
|
1724
|
+
params: props.params.map(n => asDetachedNode(n)),
|
|
1725
|
+
body: asDetachedNode(props.body),
|
|
1726
|
+
typeParameters: asDetachedNode(props.typeParameters),
|
|
1727
|
+
returnType: asDetachedNode(props.returnType),
|
|
1728
|
+
predicate: asDetachedNode(props.predicate),
|
|
1729
|
+
generator: props.generator,
|
|
1730
|
+
async: props.async,
|
|
1854
1731
|
});
|
|
1855
1732
|
setParentPointersInDirectChildren(node);
|
|
1856
1733
|
return node;
|
|
1857
1734
|
}
|
|
1858
1735
|
|
|
1859
|
-
export function FunctionExpression({
|
|
1860
|
-
parent,
|
|
1861
|
-
...props
|
|
1862
|
-
}: {
|
|
1736
|
+
export function FunctionExpression(props: {
|
|
1863
1737
|
...$ReadOnly<FunctionExpressionProps>,
|
|
1864
1738
|
+parent?: ESNode,
|
|
1865
1739
|
}): DetachedNode<FunctionExpressionType> {
|
|
1866
|
-
const node = detachedProps<FunctionExpressionType>(parent, {
|
|
1740
|
+
const node = detachedProps<FunctionExpressionType>(props.parent, {
|
|
1867
1741
|
type: 'FunctionExpression',
|
|
1868
|
-
|
|
1742
|
+
id: asDetachedNode(props.id),
|
|
1743
|
+
params: props.params.map(n => asDetachedNode(n)),
|
|
1744
|
+
body: asDetachedNode(props.body),
|
|
1745
|
+
typeParameters: asDetachedNode(props.typeParameters),
|
|
1746
|
+
returnType: asDetachedNode(props.returnType),
|
|
1747
|
+
predicate: asDetachedNode(props.predicate),
|
|
1748
|
+
generator: props.generator,
|
|
1749
|
+
async: props.async,
|
|
1869
1750
|
});
|
|
1870
1751
|
setParentPointersInDirectChildren(node);
|
|
1871
1752
|
return node;
|
|
1872
1753
|
}
|
|
1873
1754
|
|
|
1874
|
-
export function FunctionTypeAnnotation({
|
|
1875
|
-
parent,
|
|
1876
|
-
...props
|
|
1877
|
-
}: {
|
|
1755
|
+
export function FunctionTypeAnnotation(props: {
|
|
1878
1756
|
...$ReadOnly<FunctionTypeAnnotationProps>,
|
|
1879
1757
|
+parent?: ESNode,
|
|
1880
1758
|
}): DetachedNode<FunctionTypeAnnotationType> {
|
|
1881
|
-
const node = detachedProps<FunctionTypeAnnotationType>(parent, {
|
|
1759
|
+
const node = detachedProps<FunctionTypeAnnotationType>(props.parent, {
|
|
1882
1760
|
type: 'FunctionTypeAnnotation',
|
|
1883
|
-
|
|
1761
|
+
params: props.params.map(n => asDetachedNode(n)),
|
|
1762
|
+
this: asDetachedNode(props.this),
|
|
1763
|
+
returnType: asDetachedNode(props.returnType),
|
|
1764
|
+
rest: asDetachedNode(props.rest),
|
|
1765
|
+
typeParameters: asDetachedNode(props.typeParameters),
|
|
1884
1766
|
});
|
|
1885
1767
|
setParentPointersInDirectChildren(node);
|
|
1886
1768
|
return node;
|
|
1887
1769
|
}
|
|
1888
1770
|
|
|
1889
|
-
export function FunctionTypeParam({
|
|
1890
|
-
parent,
|
|
1891
|
-
...props
|
|
1892
|
-
}: {
|
|
1771
|
+
export function FunctionTypeParam(props: {
|
|
1893
1772
|
...$ReadOnly<FunctionTypeParamProps>,
|
|
1894
1773
|
+parent?: ESNode,
|
|
1895
1774
|
}): DetachedNode<FunctionTypeParamType> {
|
|
1896
|
-
const node = detachedProps<FunctionTypeParamType>(parent, {
|
|
1775
|
+
const node = detachedProps<FunctionTypeParamType>(props.parent, {
|
|
1897
1776
|
type: 'FunctionTypeParam',
|
|
1898
|
-
|
|
1777
|
+
name: asDetachedNode(props.name),
|
|
1778
|
+
typeAnnotation: asDetachedNode(props.typeAnnotation),
|
|
1779
|
+
optional: props.optional,
|
|
1899
1780
|
});
|
|
1900
1781
|
setParentPointersInDirectChildren(node);
|
|
1901
1782
|
return node;
|
|
1902
1783
|
}
|
|
1903
1784
|
|
|
1904
|
-
export function GenericTypeAnnotation({
|
|
1905
|
-
parent,
|
|
1906
|
-
...props
|
|
1907
|
-
}: {
|
|
1785
|
+
export function GenericTypeAnnotation(props: {
|
|
1908
1786
|
...$ReadOnly<GenericTypeAnnotationProps>,
|
|
1909
1787
|
+parent?: ESNode,
|
|
1910
1788
|
}): DetachedNode<GenericTypeAnnotationType> {
|
|
1911
|
-
const node = detachedProps<GenericTypeAnnotationType>(parent, {
|
|
1789
|
+
const node = detachedProps<GenericTypeAnnotationType>(props.parent, {
|
|
1912
1790
|
type: 'GenericTypeAnnotation',
|
|
1913
|
-
|
|
1791
|
+
id: asDetachedNode(props.id),
|
|
1792
|
+
typeParameters: asDetachedNode(props.typeParameters),
|
|
1914
1793
|
});
|
|
1915
1794
|
setParentPointersInDirectChildren(node);
|
|
1916
1795
|
return node;
|
|
1917
1796
|
}
|
|
1918
1797
|
|
|
1919
|
-
export function IfStatement({
|
|
1920
|
-
parent,
|
|
1921
|
-
...props
|
|
1922
|
-
}: {
|
|
1798
|
+
export function IfStatement(props: {
|
|
1923
1799
|
...$ReadOnly<IfStatementProps>,
|
|
1924
1800
|
+parent?: ESNode,
|
|
1925
1801
|
}): DetachedNode<IfStatementType> {
|
|
1926
|
-
const node = detachedProps<IfStatementType>(parent, {
|
|
1802
|
+
const node = detachedProps<IfStatementType>(props.parent, {
|
|
1927
1803
|
type: 'IfStatement',
|
|
1928
|
-
|
|
1804
|
+
test: asDetachedNode(props.test),
|
|
1805
|
+
consequent: asDetachedNode(props.consequent),
|
|
1806
|
+
alternate: asDetachedNode(props.alternate),
|
|
1929
1807
|
});
|
|
1930
1808
|
setParentPointersInDirectChildren(node);
|
|
1931
1809
|
return node;
|
|
1932
1810
|
}
|
|
1933
1811
|
|
|
1934
|
-
export function ImportAttribute({
|
|
1935
|
-
parent,
|
|
1936
|
-
...props
|
|
1937
|
-
}: {
|
|
1812
|
+
export function ImportAttribute(props: {
|
|
1938
1813
|
...$ReadOnly<ImportAttributeProps>,
|
|
1939
1814
|
+parent?: ESNode,
|
|
1940
1815
|
}): DetachedNode<ImportAttributeType> {
|
|
1941
|
-
const node = detachedProps<ImportAttributeType>(parent, {
|
|
1816
|
+
const node = detachedProps<ImportAttributeType>(props.parent, {
|
|
1942
1817
|
type: 'ImportAttribute',
|
|
1943
|
-
|
|
1818
|
+
key: asDetachedNode(props.key),
|
|
1819
|
+
value: asDetachedNode(props.value),
|
|
1944
1820
|
});
|
|
1945
1821
|
setParentPointersInDirectChildren(node);
|
|
1946
1822
|
return node;
|
|
1947
1823
|
}
|
|
1948
1824
|
|
|
1949
|
-
export function ImportDeclaration({
|
|
1950
|
-
parent,
|
|
1951
|
-
...props
|
|
1952
|
-
}: {
|
|
1825
|
+
export function ImportDeclaration(props: {
|
|
1953
1826
|
...$ReadOnly<ImportDeclarationProps>,
|
|
1954
1827
|
+parent?: ESNode,
|
|
1955
1828
|
}): DetachedNode<ImportDeclarationType> {
|
|
1956
|
-
const node = detachedProps<ImportDeclarationType>(parent, {
|
|
1829
|
+
const node = detachedProps<ImportDeclarationType>(props.parent, {
|
|
1957
1830
|
type: 'ImportDeclaration',
|
|
1958
|
-
|
|
1831
|
+
specifiers: props.specifiers.map(n => asDetachedNode(n)),
|
|
1832
|
+
source: asDetachedNode(props.source),
|
|
1833
|
+
assertions: props.assertions?.map(n => asDetachedNode(n)),
|
|
1834
|
+
importKind: props.importKind,
|
|
1959
1835
|
});
|
|
1960
1836
|
setParentPointersInDirectChildren(node);
|
|
1961
1837
|
return node;
|
|
1962
1838
|
}
|
|
1963
1839
|
|
|
1964
|
-
export function ImportDefaultSpecifier({
|
|
1965
|
-
parent,
|
|
1966
|
-
...props
|
|
1967
|
-
}: {
|
|
1840
|
+
export function ImportDefaultSpecifier(props: {
|
|
1968
1841
|
...$ReadOnly<ImportDefaultSpecifierProps>,
|
|
1969
1842
|
+parent?: ESNode,
|
|
1970
1843
|
}): DetachedNode<ImportDefaultSpecifierType> {
|
|
1971
|
-
const node = detachedProps<ImportDefaultSpecifierType>(parent, {
|
|
1844
|
+
const node = detachedProps<ImportDefaultSpecifierType>(props.parent, {
|
|
1972
1845
|
type: 'ImportDefaultSpecifier',
|
|
1973
|
-
|
|
1846
|
+
local: asDetachedNode(props.local),
|
|
1974
1847
|
});
|
|
1975
1848
|
setParentPointersInDirectChildren(node);
|
|
1976
1849
|
return node;
|
|
1977
1850
|
}
|
|
1978
1851
|
|
|
1979
|
-
export function ImportExpression({
|
|
1980
|
-
parent,
|
|
1981
|
-
...props
|
|
1982
|
-
}: {
|
|
1852
|
+
export function ImportExpression(props: {
|
|
1983
1853
|
...$ReadOnly<ImportExpressionProps>,
|
|
1984
1854
|
+parent?: ESNode,
|
|
1985
1855
|
}): DetachedNode<ImportExpressionType> {
|
|
1986
|
-
const node = detachedProps<ImportExpressionType>(parent, {
|
|
1856
|
+
const node = detachedProps<ImportExpressionType>(props.parent, {
|
|
1987
1857
|
type: 'ImportExpression',
|
|
1988
|
-
|
|
1858
|
+
source: asDetachedNode(props.source),
|
|
1859
|
+
attributes: asDetachedNode(props.attributes),
|
|
1989
1860
|
});
|
|
1990
1861
|
setParentPointersInDirectChildren(node);
|
|
1991
1862
|
return node;
|
|
1992
1863
|
}
|
|
1993
1864
|
|
|
1994
|
-
export function ImportNamespaceSpecifier({
|
|
1995
|
-
parent,
|
|
1996
|
-
...props
|
|
1997
|
-
}: {
|
|
1865
|
+
export function ImportNamespaceSpecifier(props: {
|
|
1998
1866
|
...$ReadOnly<ImportNamespaceSpecifierProps>,
|
|
1999
1867
|
+parent?: ESNode,
|
|
2000
1868
|
}): DetachedNode<ImportNamespaceSpecifierType> {
|
|
2001
|
-
const node = detachedProps<ImportNamespaceSpecifierType>(parent, {
|
|
1869
|
+
const node = detachedProps<ImportNamespaceSpecifierType>(props.parent, {
|
|
2002
1870
|
type: 'ImportNamespaceSpecifier',
|
|
2003
|
-
|
|
1871
|
+
local: asDetachedNode(props.local),
|
|
2004
1872
|
});
|
|
2005
1873
|
setParentPointersInDirectChildren(node);
|
|
2006
1874
|
return node;
|
|
2007
1875
|
}
|
|
2008
1876
|
|
|
2009
|
-
export function ImportSpecifier({
|
|
2010
|
-
parent,
|
|
2011
|
-
...props
|
|
2012
|
-
}: {
|
|
1877
|
+
export function ImportSpecifier(props: {
|
|
2013
1878
|
...$ReadOnly<ImportSpecifierProps>,
|
|
2014
1879
|
+parent?: ESNode,
|
|
2015
1880
|
}): DetachedNode<ImportSpecifierType> {
|
|
2016
|
-
const node = detachedProps<ImportSpecifierType>(parent, {
|
|
1881
|
+
const node = detachedProps<ImportSpecifierType>(props.parent, {
|
|
2017
1882
|
type: 'ImportSpecifier',
|
|
2018
|
-
|
|
1883
|
+
imported: asDetachedNode(props.imported),
|
|
1884
|
+
local: asDetachedNode(props.local),
|
|
1885
|
+
importKind: props.importKind,
|
|
2019
1886
|
});
|
|
2020
1887
|
setParentPointersInDirectChildren(node);
|
|
2021
1888
|
return node;
|
|
2022
1889
|
}
|
|
2023
1890
|
|
|
2024
|
-
export function IndexedAccessType({
|
|
2025
|
-
parent,
|
|
2026
|
-
...props
|
|
2027
|
-
}: {
|
|
1891
|
+
export function IndexedAccessType(props: {
|
|
2028
1892
|
...$ReadOnly<IndexedAccessTypeProps>,
|
|
2029
1893
|
+parent?: ESNode,
|
|
2030
1894
|
}): DetachedNode<IndexedAccessTypeType> {
|
|
2031
|
-
const node = detachedProps<IndexedAccessTypeType>(parent, {
|
|
1895
|
+
const node = detachedProps<IndexedAccessTypeType>(props.parent, {
|
|
2032
1896
|
type: 'IndexedAccessType',
|
|
2033
|
-
|
|
1897
|
+
objectType: asDetachedNode(props.objectType),
|
|
1898
|
+
indexType: asDetachedNode(props.indexType),
|
|
2034
1899
|
});
|
|
2035
1900
|
setParentPointersInDirectChildren(node);
|
|
2036
1901
|
return node;
|
|
2037
1902
|
}
|
|
2038
1903
|
|
|
2039
|
-
export function InferredPredicate(
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
return detachedProps<InferredPredicateType>(parent, {
|
|
1904
|
+
export function InferredPredicate(
|
|
1905
|
+
props: {
|
|
1906
|
+
+parent?: ESNode,
|
|
1907
|
+
} = {...null},
|
|
1908
|
+
): DetachedNode<InferredPredicateType> {
|
|
1909
|
+
return detachedProps<InferredPredicateType>(props.parent, {
|
|
2045
1910
|
type: 'InferredPredicate',
|
|
2046
1911
|
});
|
|
2047
1912
|
}
|
|
2048
1913
|
|
|
2049
|
-
export function InterfaceDeclaration({
|
|
2050
|
-
parent,
|
|
2051
|
-
...props
|
|
2052
|
-
}: {
|
|
1914
|
+
export function InterfaceDeclaration(props: {
|
|
2053
1915
|
...$ReadOnly<InterfaceDeclarationProps>,
|
|
2054
1916
|
+parent?: ESNode,
|
|
2055
1917
|
}): DetachedNode<InterfaceDeclarationType> {
|
|
2056
|
-
const node = detachedProps<InterfaceDeclarationType>(parent, {
|
|
1918
|
+
const node = detachedProps<InterfaceDeclarationType>(props.parent, {
|
|
2057
1919
|
type: 'InterfaceDeclaration',
|
|
2058
|
-
|
|
1920
|
+
id: asDetachedNode(props.id),
|
|
1921
|
+
typeParameters: asDetachedNode(props.typeParameters),
|
|
1922
|
+
extends: props.extends.map(n => asDetachedNode(n)),
|
|
1923
|
+
body: asDetachedNode(props.body),
|
|
2059
1924
|
});
|
|
2060
1925
|
setParentPointersInDirectChildren(node);
|
|
2061
1926
|
return node;
|
|
2062
1927
|
}
|
|
2063
1928
|
|
|
2064
|
-
export function InterfaceExtends({
|
|
2065
|
-
parent,
|
|
2066
|
-
...props
|
|
2067
|
-
}: {
|
|
1929
|
+
export function InterfaceExtends(props: {
|
|
2068
1930
|
...$ReadOnly<InterfaceExtendsProps>,
|
|
2069
1931
|
+parent?: ESNode,
|
|
2070
1932
|
}): DetachedNode<InterfaceExtendsType> {
|
|
2071
|
-
const node = detachedProps<InterfaceExtendsType>(parent, {
|
|
1933
|
+
const node = detachedProps<InterfaceExtendsType>(props.parent, {
|
|
2072
1934
|
type: 'InterfaceExtends',
|
|
2073
|
-
|
|
1935
|
+
id: asDetachedNode(props.id),
|
|
1936
|
+
typeParameters: asDetachedNode(props.typeParameters),
|
|
2074
1937
|
});
|
|
2075
1938
|
setParentPointersInDirectChildren(node);
|
|
2076
1939
|
return node;
|
|
2077
1940
|
}
|
|
2078
1941
|
|
|
2079
|
-
export function InterfaceTypeAnnotation({
|
|
2080
|
-
parent,
|
|
2081
|
-
...props
|
|
2082
|
-
}: {
|
|
1942
|
+
export function InterfaceTypeAnnotation(props: {
|
|
2083
1943
|
...$ReadOnly<InterfaceTypeAnnotationProps>,
|
|
2084
1944
|
+parent?: ESNode,
|
|
2085
1945
|
}): DetachedNode<InterfaceTypeAnnotationType> {
|
|
2086
|
-
const node = detachedProps<InterfaceTypeAnnotationType>(parent, {
|
|
1946
|
+
const node = detachedProps<InterfaceTypeAnnotationType>(props.parent, {
|
|
2087
1947
|
type: 'InterfaceTypeAnnotation',
|
|
2088
|
-
|
|
1948
|
+
extends: props.extends.map(n => asDetachedNode(n)),
|
|
1949
|
+
body: asDetachedNode(props.body),
|
|
2089
1950
|
});
|
|
2090
1951
|
setParentPointersInDirectChildren(node);
|
|
2091
1952
|
return node;
|
|
2092
1953
|
}
|
|
2093
1954
|
|
|
2094
|
-
export function IntersectionTypeAnnotation({
|
|
2095
|
-
parent,
|
|
2096
|
-
...props
|
|
2097
|
-
}: {
|
|
1955
|
+
export function IntersectionTypeAnnotation(props: {
|
|
2098
1956
|
...$ReadOnly<IntersectionTypeAnnotationProps>,
|
|
2099
1957
|
+parent?: ESNode,
|
|
2100
1958
|
}): DetachedNode<IntersectionTypeAnnotationType> {
|
|
2101
|
-
const node = detachedProps<IntersectionTypeAnnotationType>(parent, {
|
|
1959
|
+
const node = detachedProps<IntersectionTypeAnnotationType>(props.parent, {
|
|
2102
1960
|
type: 'IntersectionTypeAnnotation',
|
|
2103
|
-
|
|
1961
|
+
types: props.types.map(n => asDetachedNode(n)),
|
|
2104
1962
|
});
|
|
2105
1963
|
setParentPointersInDirectChildren(node);
|
|
2106
1964
|
return node;
|
|
2107
1965
|
}
|
|
2108
1966
|
|
|
2109
|
-
export function JSXAttribute({
|
|
2110
|
-
parent,
|
|
2111
|
-
...props
|
|
2112
|
-
}: {
|
|
1967
|
+
export function JSXAttribute(props: {
|
|
2113
1968
|
...$ReadOnly<JSXAttributeProps>,
|
|
2114
1969
|
+parent?: ESNode,
|
|
2115
1970
|
}): DetachedNode<JSXAttributeType> {
|
|
2116
|
-
const node = detachedProps<JSXAttributeType>(parent, {
|
|
1971
|
+
const node = detachedProps<JSXAttributeType>(props.parent, {
|
|
2117
1972
|
type: 'JSXAttribute',
|
|
2118
|
-
|
|
1973
|
+
name: asDetachedNode(props.name),
|
|
1974
|
+
value: asDetachedNode(props.value),
|
|
2119
1975
|
});
|
|
2120
1976
|
setParentPointersInDirectChildren(node);
|
|
2121
1977
|
return node;
|
|
2122
1978
|
}
|
|
2123
1979
|
|
|
2124
|
-
export function JSXClosingElement({
|
|
2125
|
-
parent,
|
|
2126
|
-
...props
|
|
2127
|
-
}: {
|
|
1980
|
+
export function JSXClosingElement(props: {
|
|
2128
1981
|
...$ReadOnly<JSXClosingElementProps>,
|
|
2129
1982
|
+parent?: ESNode,
|
|
2130
1983
|
}): DetachedNode<JSXClosingElementType> {
|
|
2131
|
-
const node = detachedProps<JSXClosingElementType>(parent, {
|
|
1984
|
+
const node = detachedProps<JSXClosingElementType>(props.parent, {
|
|
2132
1985
|
type: 'JSXClosingElement',
|
|
2133
|
-
|
|
1986
|
+
name: asDetachedNode(props.name),
|
|
2134
1987
|
});
|
|
2135
1988
|
setParentPointersInDirectChildren(node);
|
|
2136
1989
|
return node;
|
|
2137
1990
|
}
|
|
2138
1991
|
|
|
2139
|
-
export function JSXClosingFragment(
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
return detachedProps<JSXClosingFragmentType>(parent, {
|
|
1992
|
+
export function JSXClosingFragment(
|
|
1993
|
+
props: {
|
|
1994
|
+
+parent?: ESNode,
|
|
1995
|
+
} = {...null},
|
|
1996
|
+
): DetachedNode<JSXClosingFragmentType> {
|
|
1997
|
+
return detachedProps<JSXClosingFragmentType>(props.parent, {
|
|
2145
1998
|
type: 'JSXClosingFragment',
|
|
2146
1999
|
});
|
|
2147
2000
|
}
|
|
2148
2001
|
|
|
2149
|
-
export function JSXElement({
|
|
2150
|
-
parent,
|
|
2151
|
-
...props
|
|
2152
|
-
}: {
|
|
2002
|
+
export function JSXElement(props: {
|
|
2153
2003
|
...$ReadOnly<JSXElementProps>,
|
|
2154
2004
|
+parent?: ESNode,
|
|
2155
2005
|
}): DetachedNode<JSXElementType> {
|
|
2156
|
-
const node = detachedProps<JSXElementType>(parent, {
|
|
2006
|
+
const node = detachedProps<JSXElementType>(props.parent, {
|
|
2157
2007
|
type: 'JSXElement',
|
|
2158
|
-
|
|
2008
|
+
openingElement: asDetachedNode(props.openingElement),
|
|
2009
|
+
children: props.children.map(n => asDetachedNode(n)),
|
|
2010
|
+
closingElement: asDetachedNode(props.closingElement),
|
|
2159
2011
|
});
|
|
2160
2012
|
setParentPointersInDirectChildren(node);
|
|
2161
2013
|
return node;
|
|
2162
2014
|
}
|
|
2163
2015
|
|
|
2164
|
-
export function JSXEmptyExpression(
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
return detachedProps<JSXEmptyExpressionType>(parent, {
|
|
2016
|
+
export function JSXEmptyExpression(
|
|
2017
|
+
props: {
|
|
2018
|
+
+parent?: ESNode,
|
|
2019
|
+
} = {...null},
|
|
2020
|
+
): DetachedNode<JSXEmptyExpressionType> {
|
|
2021
|
+
return detachedProps<JSXEmptyExpressionType>(props.parent, {
|
|
2170
2022
|
type: 'JSXEmptyExpression',
|
|
2171
2023
|
});
|
|
2172
2024
|
}
|
|
2173
2025
|
|
|
2174
|
-
export function JSXExpressionContainer({
|
|
2175
|
-
parent,
|
|
2176
|
-
...props
|
|
2177
|
-
}: {
|
|
2026
|
+
export function JSXExpressionContainer(props: {
|
|
2178
2027
|
...$ReadOnly<JSXExpressionContainerProps>,
|
|
2179
2028
|
+parent?: ESNode,
|
|
2180
2029
|
}): DetachedNode<JSXExpressionContainerType> {
|
|
2181
|
-
const node = detachedProps<JSXExpressionContainerType>(parent, {
|
|
2030
|
+
const node = detachedProps<JSXExpressionContainerType>(props.parent, {
|
|
2182
2031
|
type: 'JSXExpressionContainer',
|
|
2183
|
-
|
|
2032
|
+
expression: asDetachedNode(props.expression),
|
|
2184
2033
|
});
|
|
2185
2034
|
setParentPointersInDirectChildren(node);
|
|
2186
2035
|
return node;
|
|
2187
2036
|
}
|
|
2188
2037
|
|
|
2189
|
-
export function JSXFragment({
|
|
2190
|
-
parent,
|
|
2191
|
-
...props
|
|
2192
|
-
}: {
|
|
2038
|
+
export function JSXFragment(props: {
|
|
2193
2039
|
...$ReadOnly<JSXFragmentProps>,
|
|
2194
2040
|
+parent?: ESNode,
|
|
2195
2041
|
}): DetachedNode<JSXFragmentType> {
|
|
2196
|
-
const node = detachedProps<JSXFragmentType>(parent, {
|
|
2042
|
+
const node = detachedProps<JSXFragmentType>(props.parent, {
|
|
2197
2043
|
type: 'JSXFragment',
|
|
2198
|
-
|
|
2044
|
+
openingFragment: asDetachedNode(props.openingFragment),
|
|
2045
|
+
children: props.children.map(n => asDetachedNode(n)),
|
|
2046
|
+
closingFragment: asDetachedNode(props.closingFragment),
|
|
2199
2047
|
});
|
|
2200
2048
|
setParentPointersInDirectChildren(node);
|
|
2201
2049
|
return node;
|
|
2202
2050
|
}
|
|
2203
2051
|
|
|
2204
|
-
export function JSXIdentifier({
|
|
2205
|
-
parent,
|
|
2206
|
-
...props
|
|
2207
|
-
}: {
|
|
2052
|
+
export function JSXIdentifier(props: {
|
|
2208
2053
|
...$ReadOnly<JSXIdentifierProps>,
|
|
2209
2054
|
+parent?: ESNode,
|
|
2210
2055
|
}): DetachedNode<JSXIdentifierType> {
|
|
2211
|
-
const node = detachedProps<JSXIdentifierType>(parent, {
|
|
2056
|
+
const node = detachedProps<JSXIdentifierType>(props.parent, {
|
|
2212
2057
|
type: 'JSXIdentifier',
|
|
2213
|
-
|
|
2058
|
+
name: props.name,
|
|
2214
2059
|
});
|
|
2215
2060
|
setParentPointersInDirectChildren(node);
|
|
2216
2061
|
return node;
|
|
2217
2062
|
}
|
|
2218
2063
|
|
|
2219
|
-
export function JSXMemberExpression({
|
|
2220
|
-
parent,
|
|
2221
|
-
...props
|
|
2222
|
-
}: {
|
|
2064
|
+
export function JSXMemberExpression(props: {
|
|
2223
2065
|
...$ReadOnly<JSXMemberExpressionProps>,
|
|
2224
2066
|
+parent?: ESNode,
|
|
2225
2067
|
}): DetachedNode<JSXMemberExpressionType> {
|
|
2226
|
-
const node = detachedProps<JSXMemberExpressionType>(parent, {
|
|
2068
|
+
const node = detachedProps<JSXMemberExpressionType>(props.parent, {
|
|
2227
2069
|
type: 'JSXMemberExpression',
|
|
2228
|
-
|
|
2070
|
+
object: asDetachedNode(props.object),
|
|
2071
|
+
property: asDetachedNode(props.property),
|
|
2229
2072
|
});
|
|
2230
2073
|
setParentPointersInDirectChildren(node);
|
|
2231
2074
|
return node;
|
|
2232
2075
|
}
|
|
2233
2076
|
|
|
2234
|
-
export function JSXNamespacedName({
|
|
2235
|
-
parent,
|
|
2236
|
-
...props
|
|
2237
|
-
}: {
|
|
2077
|
+
export function JSXNamespacedName(props: {
|
|
2238
2078
|
...$ReadOnly<JSXNamespacedNameProps>,
|
|
2239
2079
|
+parent?: ESNode,
|
|
2240
2080
|
}): DetachedNode<JSXNamespacedNameType> {
|
|
2241
|
-
const node = detachedProps<JSXNamespacedNameType>(parent, {
|
|
2081
|
+
const node = detachedProps<JSXNamespacedNameType>(props.parent, {
|
|
2242
2082
|
type: 'JSXNamespacedName',
|
|
2243
|
-
|
|
2083
|
+
namespace: asDetachedNode(props.namespace),
|
|
2084
|
+
name: asDetachedNode(props.name),
|
|
2244
2085
|
});
|
|
2245
2086
|
setParentPointersInDirectChildren(node);
|
|
2246
2087
|
return node;
|
|
2247
2088
|
}
|
|
2248
2089
|
|
|
2249
|
-
export function JSXOpeningElement({
|
|
2250
|
-
parent,
|
|
2251
|
-
...props
|
|
2252
|
-
}: {
|
|
2090
|
+
export function JSXOpeningElement(props: {
|
|
2253
2091
|
...$ReadOnly<JSXOpeningElementProps>,
|
|
2254
2092
|
+parent?: ESNode,
|
|
2255
2093
|
}): DetachedNode<JSXOpeningElementType> {
|
|
2256
|
-
const node = detachedProps<JSXOpeningElementType>(parent, {
|
|
2094
|
+
const node = detachedProps<JSXOpeningElementType>(props.parent, {
|
|
2257
2095
|
type: 'JSXOpeningElement',
|
|
2258
|
-
|
|
2096
|
+
name: asDetachedNode(props.name),
|
|
2097
|
+
attributes: props.attributes.map(n => asDetachedNode(n)),
|
|
2098
|
+
selfClosing: props.selfClosing,
|
|
2259
2099
|
});
|
|
2260
2100
|
setParentPointersInDirectChildren(node);
|
|
2261
2101
|
return node;
|
|
2262
2102
|
}
|
|
2263
2103
|
|
|
2264
|
-
export function JSXOpeningFragment(
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
return detachedProps<JSXOpeningFragmentType>(parent, {
|
|
2104
|
+
export function JSXOpeningFragment(
|
|
2105
|
+
props: {
|
|
2106
|
+
+parent?: ESNode,
|
|
2107
|
+
} = {...null},
|
|
2108
|
+
): DetachedNode<JSXOpeningFragmentType> {
|
|
2109
|
+
return detachedProps<JSXOpeningFragmentType>(props.parent, {
|
|
2270
2110
|
type: 'JSXOpeningFragment',
|
|
2271
2111
|
});
|
|
2272
2112
|
}
|
|
2273
2113
|
|
|
2274
|
-
export function JSXSpreadAttribute({
|
|
2275
|
-
parent,
|
|
2276
|
-
...props
|
|
2277
|
-
}: {
|
|
2114
|
+
export function JSXSpreadAttribute(props: {
|
|
2278
2115
|
...$ReadOnly<JSXSpreadAttributeProps>,
|
|
2279
2116
|
+parent?: ESNode,
|
|
2280
2117
|
}): DetachedNode<JSXSpreadAttributeType> {
|
|
2281
|
-
const node = detachedProps<JSXSpreadAttributeType>(parent, {
|
|
2118
|
+
const node = detachedProps<JSXSpreadAttributeType>(props.parent, {
|
|
2282
2119
|
type: 'JSXSpreadAttribute',
|
|
2283
|
-
|
|
2120
|
+
argument: asDetachedNode(props.argument),
|
|
2284
2121
|
});
|
|
2285
2122
|
setParentPointersInDirectChildren(node);
|
|
2286
2123
|
return node;
|
|
2287
2124
|
}
|
|
2288
2125
|
|
|
2289
|
-
export function JSXSpreadChild({
|
|
2290
|
-
parent,
|
|
2291
|
-
...props
|
|
2292
|
-
}: {
|
|
2126
|
+
export function JSXSpreadChild(props: {
|
|
2293
2127
|
...$ReadOnly<JSXSpreadChildProps>,
|
|
2294
2128
|
+parent?: ESNode,
|
|
2295
2129
|
}): DetachedNode<JSXSpreadChildType> {
|
|
2296
|
-
const node = detachedProps<JSXSpreadChildType>(parent, {
|
|
2130
|
+
const node = detachedProps<JSXSpreadChildType>(props.parent, {
|
|
2297
2131
|
type: 'JSXSpreadChild',
|
|
2298
|
-
|
|
2132
|
+
expression: asDetachedNode(props.expression),
|
|
2299
2133
|
});
|
|
2300
2134
|
setParentPointersInDirectChildren(node);
|
|
2301
2135
|
return node;
|
|
2302
2136
|
}
|
|
2303
2137
|
|
|
2304
|
-
export function JSXText({
|
|
2305
|
-
parent,
|
|
2306
|
-
...props
|
|
2307
|
-
}: {
|
|
2138
|
+
export function JSXText(props: {
|
|
2308
2139
|
...$ReadOnly<JSXTextProps>,
|
|
2309
2140
|
+parent?: ESNode,
|
|
2310
2141
|
}): DetachedNode<JSXTextType> {
|
|
2311
|
-
const node = detachedProps<JSXTextType>(parent, {
|
|
2142
|
+
const node = detachedProps<JSXTextType>(props.parent, {
|
|
2312
2143
|
type: 'JSXText',
|
|
2313
|
-
|
|
2144
|
+
value: props.value,
|
|
2145
|
+
raw: props.raw,
|
|
2314
2146
|
});
|
|
2315
2147
|
setParentPointersInDirectChildren(node);
|
|
2316
2148
|
return node;
|
|
2317
2149
|
}
|
|
2318
2150
|
|
|
2319
|
-
export function LabeledStatement({
|
|
2320
|
-
parent,
|
|
2321
|
-
...props
|
|
2322
|
-
}: {
|
|
2151
|
+
export function LabeledStatement(props: {
|
|
2323
2152
|
...$ReadOnly<LabeledStatementProps>,
|
|
2324
2153
|
+parent?: ESNode,
|
|
2325
2154
|
}): DetachedNode<LabeledStatementType> {
|
|
2326
|
-
const node = detachedProps<LabeledStatementType>(parent, {
|
|
2155
|
+
const node = detachedProps<LabeledStatementType>(props.parent, {
|
|
2327
2156
|
type: 'LabeledStatement',
|
|
2328
|
-
|
|
2157
|
+
label: asDetachedNode(props.label),
|
|
2158
|
+
body: asDetachedNode(props.body),
|
|
2329
2159
|
});
|
|
2330
2160
|
setParentPointersInDirectChildren(node);
|
|
2331
2161
|
return node;
|
|
2332
2162
|
}
|
|
2333
2163
|
|
|
2334
|
-
export function LogicalExpression({
|
|
2335
|
-
parent,
|
|
2336
|
-
...props
|
|
2337
|
-
}: {
|
|
2164
|
+
export function LogicalExpression(props: {
|
|
2338
2165
|
...$ReadOnly<LogicalExpressionProps>,
|
|
2339
2166
|
+parent?: ESNode,
|
|
2340
2167
|
}): DetachedNode<LogicalExpressionType> {
|
|
2341
|
-
const node = detachedProps<LogicalExpressionType>(parent, {
|
|
2168
|
+
const node = detachedProps<LogicalExpressionType>(props.parent, {
|
|
2342
2169
|
type: 'LogicalExpression',
|
|
2343
|
-
|
|
2170
|
+
left: asDetachedNode(props.left),
|
|
2171
|
+
right: asDetachedNode(props.right),
|
|
2172
|
+
operator: props.operator,
|
|
2344
2173
|
});
|
|
2345
2174
|
setParentPointersInDirectChildren(node);
|
|
2346
2175
|
return node;
|
|
2347
2176
|
}
|
|
2348
2177
|
|
|
2349
|
-
export function MemberExpression({
|
|
2350
|
-
parent,
|
|
2351
|
-
...props
|
|
2352
|
-
}: {
|
|
2178
|
+
export function MemberExpression(props: {
|
|
2353
2179
|
...$ReadOnly<MemberExpressionProps>,
|
|
2354
2180
|
+parent?: ESNode,
|
|
2355
2181
|
}): DetachedNode<MemberExpressionType> {
|
|
2356
|
-
const node = detachedProps<MemberExpressionType>(parent, {
|
|
2182
|
+
const node = detachedProps<MemberExpressionType>(props.parent, {
|
|
2357
2183
|
type: 'MemberExpression',
|
|
2358
|
-
|
|
2184
|
+
object: asDetachedNode(props.object),
|
|
2185
|
+
property: asDetachedNode(props.property),
|
|
2186
|
+
computed: props.computed,
|
|
2359
2187
|
});
|
|
2360
2188
|
setParentPointersInDirectChildren(node);
|
|
2361
2189
|
return node;
|
|
2362
2190
|
}
|
|
2363
2191
|
|
|
2364
|
-
export function MetaProperty({
|
|
2365
|
-
parent,
|
|
2366
|
-
...props
|
|
2367
|
-
}: {
|
|
2192
|
+
export function MetaProperty(props: {
|
|
2368
2193
|
...$ReadOnly<MetaPropertyProps>,
|
|
2369
2194
|
+parent?: ESNode,
|
|
2370
2195
|
}): DetachedNode<MetaPropertyType> {
|
|
2371
|
-
const node = detachedProps<MetaPropertyType>(parent, {
|
|
2196
|
+
const node = detachedProps<MetaPropertyType>(props.parent, {
|
|
2372
2197
|
type: 'MetaProperty',
|
|
2373
|
-
|
|
2198
|
+
meta: asDetachedNode(props.meta),
|
|
2199
|
+
property: asDetachedNode(props.property),
|
|
2374
2200
|
});
|
|
2375
2201
|
setParentPointersInDirectChildren(node);
|
|
2376
2202
|
return node;
|
|
2377
2203
|
}
|
|
2378
2204
|
|
|
2379
|
-
export function MethodDefinition({
|
|
2380
|
-
parent,
|
|
2381
|
-
...props
|
|
2382
|
-
}: {
|
|
2205
|
+
export function MethodDefinition(props: {
|
|
2383
2206
|
...$ReadOnly<MethodDefinitionProps>,
|
|
2384
2207
|
+parent?: ESNode,
|
|
2385
2208
|
}): DetachedNode<MethodDefinitionType> {
|
|
2386
|
-
const node = detachedProps<MethodDefinitionType>(parent, {
|
|
2209
|
+
const node = detachedProps<MethodDefinitionType>(props.parent, {
|
|
2387
2210
|
type: 'MethodDefinition',
|
|
2388
|
-
|
|
2211
|
+
key: asDetachedNode(props.key),
|
|
2212
|
+
value: asDetachedNode(props.value),
|
|
2213
|
+
kind: props.kind,
|
|
2214
|
+
computed: props.computed,
|
|
2215
|
+
static: props.static,
|
|
2389
2216
|
});
|
|
2390
2217
|
setParentPointersInDirectChildren(node);
|
|
2391
2218
|
return node;
|
|
2392
2219
|
}
|
|
2393
2220
|
|
|
2394
|
-
export function MixedTypeAnnotation(
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
return detachedProps<MixedTypeAnnotationType>(parent, {
|
|
2221
|
+
export function MixedTypeAnnotation(
|
|
2222
|
+
props: {
|
|
2223
|
+
+parent?: ESNode,
|
|
2224
|
+
} = {...null},
|
|
2225
|
+
): DetachedNode<MixedTypeAnnotationType> {
|
|
2226
|
+
return detachedProps<MixedTypeAnnotationType>(props.parent, {
|
|
2400
2227
|
type: 'MixedTypeAnnotation',
|
|
2401
2228
|
});
|
|
2402
2229
|
}
|
|
2403
2230
|
|
|
2404
|
-
export function NewExpression({
|
|
2405
|
-
parent,
|
|
2406
|
-
...props
|
|
2407
|
-
}: {
|
|
2231
|
+
export function NewExpression(props: {
|
|
2408
2232
|
...$ReadOnly<NewExpressionProps>,
|
|
2409
2233
|
+parent?: ESNode,
|
|
2410
2234
|
}): DetachedNode<NewExpressionType> {
|
|
2411
|
-
const node = detachedProps<NewExpressionType>(parent, {
|
|
2235
|
+
const node = detachedProps<NewExpressionType>(props.parent, {
|
|
2412
2236
|
type: 'NewExpression',
|
|
2413
|
-
|
|
2237
|
+
callee: asDetachedNode(props.callee),
|
|
2238
|
+
typeArguments: asDetachedNode(props.typeArguments),
|
|
2239
|
+
arguments: props.arguments.map(n => asDetachedNode(n)),
|
|
2414
2240
|
});
|
|
2415
2241
|
setParentPointersInDirectChildren(node);
|
|
2416
2242
|
return node;
|
|
2417
2243
|
}
|
|
2418
2244
|
|
|
2419
|
-
export function NullableTypeAnnotation({
|
|
2420
|
-
parent,
|
|
2421
|
-
...props
|
|
2422
|
-
}: {
|
|
2245
|
+
export function NullableTypeAnnotation(props: {
|
|
2423
2246
|
...$ReadOnly<NullableTypeAnnotationProps>,
|
|
2424
2247
|
+parent?: ESNode,
|
|
2425
2248
|
}): DetachedNode<NullableTypeAnnotationType> {
|
|
2426
|
-
const node = detachedProps<NullableTypeAnnotationType>(parent, {
|
|
2249
|
+
const node = detachedProps<NullableTypeAnnotationType>(props.parent, {
|
|
2427
2250
|
type: 'NullableTypeAnnotation',
|
|
2428
|
-
|
|
2251
|
+
typeAnnotation: asDetachedNode(props.typeAnnotation),
|
|
2429
2252
|
});
|
|
2430
2253
|
setParentPointersInDirectChildren(node);
|
|
2431
2254
|
return node;
|
|
2432
2255
|
}
|
|
2433
2256
|
|
|
2434
|
-
export function NullLiteralTypeAnnotation(
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
return detachedProps<NullLiteralTypeAnnotationType>(parent, {
|
|
2257
|
+
export function NullLiteralTypeAnnotation(
|
|
2258
|
+
props: {
|
|
2259
|
+
+parent?: ESNode,
|
|
2260
|
+
} = {...null},
|
|
2261
|
+
): DetachedNode<NullLiteralTypeAnnotationType> {
|
|
2262
|
+
return detachedProps<NullLiteralTypeAnnotationType>(props.parent, {
|
|
2440
2263
|
type: 'NullLiteralTypeAnnotation',
|
|
2441
2264
|
});
|
|
2442
2265
|
}
|
|
2443
2266
|
|
|
2444
|
-
export function NumberLiteralTypeAnnotation({
|
|
2445
|
-
parent,
|
|
2446
|
-
...props
|
|
2447
|
-
}: {
|
|
2267
|
+
export function NumberLiteralTypeAnnotation(props: {
|
|
2448
2268
|
...$ReadOnly<NumberLiteralTypeAnnotationProps>,
|
|
2449
2269
|
+parent?: ESNode,
|
|
2450
2270
|
}): DetachedNode<NumberLiteralTypeAnnotationType> {
|
|
2451
|
-
const node = detachedProps<NumberLiteralTypeAnnotationType>(parent, {
|
|
2271
|
+
const node = detachedProps<NumberLiteralTypeAnnotationType>(props.parent, {
|
|
2452
2272
|
type: 'NumberLiteralTypeAnnotation',
|
|
2453
|
-
|
|
2273
|
+
value: props.value,
|
|
2274
|
+
raw: props.raw,
|
|
2454
2275
|
});
|
|
2455
2276
|
setParentPointersInDirectChildren(node);
|
|
2456
2277
|
return node;
|
|
2457
2278
|
}
|
|
2458
2279
|
|
|
2459
|
-
export function NumberTypeAnnotation(
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
return detachedProps<NumberTypeAnnotationType>(parent, {
|
|
2280
|
+
export function NumberTypeAnnotation(
|
|
2281
|
+
props: {
|
|
2282
|
+
+parent?: ESNode,
|
|
2283
|
+
} = {...null},
|
|
2284
|
+
): DetachedNode<NumberTypeAnnotationType> {
|
|
2285
|
+
return detachedProps<NumberTypeAnnotationType>(props.parent, {
|
|
2465
2286
|
type: 'NumberTypeAnnotation',
|
|
2466
2287
|
});
|
|
2467
2288
|
}
|
|
2468
2289
|
|
|
2469
|
-
export function ObjectExpression({
|
|
2470
|
-
parent,
|
|
2471
|
-
...props
|
|
2472
|
-
}: {
|
|
2290
|
+
export function ObjectExpression(props: {
|
|
2473
2291
|
...$ReadOnly<ObjectExpressionProps>,
|
|
2474
2292
|
+parent?: ESNode,
|
|
2475
2293
|
}): DetachedNode<ObjectExpressionType> {
|
|
2476
|
-
const node = detachedProps<ObjectExpressionType>(parent, {
|
|
2294
|
+
const node = detachedProps<ObjectExpressionType>(props.parent, {
|
|
2477
2295
|
type: 'ObjectExpression',
|
|
2478
|
-
|
|
2296
|
+
properties: props.properties.map(n => asDetachedNode(n)),
|
|
2479
2297
|
});
|
|
2480
2298
|
setParentPointersInDirectChildren(node);
|
|
2481
2299
|
return node;
|
|
2482
2300
|
}
|
|
2483
2301
|
|
|
2484
|
-
export function ObjectPattern({
|
|
2485
|
-
parent,
|
|
2486
|
-
...props
|
|
2487
|
-
}: {
|
|
2302
|
+
export function ObjectPattern(props: {
|
|
2488
2303
|
...$ReadOnly<ObjectPatternProps>,
|
|
2489
2304
|
+parent?: ESNode,
|
|
2490
2305
|
}): DetachedNode<ObjectPatternType> {
|
|
2491
|
-
const node = detachedProps<ObjectPatternType>(parent, {
|
|
2306
|
+
const node = detachedProps<ObjectPatternType>(props.parent, {
|
|
2492
2307
|
type: 'ObjectPattern',
|
|
2493
|
-
|
|
2308
|
+
properties: props.properties.map(n => asDetachedNode(n)),
|
|
2309
|
+
typeAnnotation: asDetachedNode(props.typeAnnotation),
|
|
2494
2310
|
});
|
|
2495
2311
|
setParentPointersInDirectChildren(node);
|
|
2496
2312
|
return node;
|
|
2497
2313
|
}
|
|
2498
2314
|
|
|
2499
|
-
export function ObjectTypeAnnotation({
|
|
2500
|
-
parent,
|
|
2501
|
-
...props
|
|
2502
|
-
}: {
|
|
2315
|
+
export function ObjectTypeAnnotation(props: {
|
|
2503
2316
|
...$ReadOnly<ObjectTypeAnnotationProps>,
|
|
2504
2317
|
+parent?: ESNode,
|
|
2505
2318
|
}): DetachedNode<ObjectTypeAnnotationType> {
|
|
2506
|
-
const node = detachedProps<ObjectTypeAnnotationType>(parent, {
|
|
2319
|
+
const node = detachedProps<ObjectTypeAnnotationType>(props.parent, {
|
|
2507
2320
|
type: 'ObjectTypeAnnotation',
|
|
2508
|
-
|
|
2321
|
+
properties: props.properties.map(n => asDetachedNode(n)),
|
|
2322
|
+
indexers: props.indexers.map(n => asDetachedNode(n)),
|
|
2323
|
+
callProperties: props.callProperties.map(n => asDetachedNode(n)),
|
|
2324
|
+
internalSlots: props.internalSlots.map(n => asDetachedNode(n)),
|
|
2325
|
+
inexact: props.inexact,
|
|
2326
|
+
exact: props.exact,
|
|
2509
2327
|
});
|
|
2510
2328
|
setParentPointersInDirectChildren(node);
|
|
2511
2329
|
return node;
|
|
2512
2330
|
}
|
|
2513
2331
|
|
|
2514
|
-
export function ObjectTypeCallProperty({
|
|
2515
|
-
parent,
|
|
2516
|
-
...props
|
|
2517
|
-
}: {
|
|
2332
|
+
export function ObjectTypeCallProperty(props: {
|
|
2518
2333
|
...$ReadOnly<ObjectTypeCallPropertyProps>,
|
|
2519
2334
|
+parent?: ESNode,
|
|
2520
2335
|
}): DetachedNode<ObjectTypeCallPropertyType> {
|
|
2521
|
-
const node = detachedProps<ObjectTypeCallPropertyType>(parent, {
|
|
2336
|
+
const node = detachedProps<ObjectTypeCallPropertyType>(props.parent, {
|
|
2522
2337
|
type: 'ObjectTypeCallProperty',
|
|
2523
|
-
|
|
2338
|
+
value: asDetachedNode(props.value),
|
|
2339
|
+
static: props.static,
|
|
2524
2340
|
});
|
|
2525
2341
|
setParentPointersInDirectChildren(node);
|
|
2526
2342
|
return node;
|
|
2527
2343
|
}
|
|
2528
2344
|
|
|
2529
|
-
export function ObjectTypeIndexer({
|
|
2530
|
-
parent,
|
|
2531
|
-
...props
|
|
2532
|
-
}: {
|
|
2345
|
+
export function ObjectTypeIndexer(props: {
|
|
2533
2346
|
...$ReadOnly<ObjectTypeIndexerProps>,
|
|
2534
2347
|
+parent?: ESNode,
|
|
2535
2348
|
}): DetachedNode<ObjectTypeIndexerType> {
|
|
2536
|
-
const node = detachedProps<ObjectTypeIndexerType>(parent, {
|
|
2349
|
+
const node = detachedProps<ObjectTypeIndexerType>(props.parent, {
|
|
2537
2350
|
type: 'ObjectTypeIndexer',
|
|
2538
|
-
|
|
2351
|
+
id: asDetachedNode(props.id),
|
|
2352
|
+
key: asDetachedNode(props.key),
|
|
2353
|
+
value: asDetachedNode(props.value),
|
|
2354
|
+
static: props.static,
|
|
2355
|
+
variance: asDetachedNode(props.variance),
|
|
2539
2356
|
});
|
|
2540
2357
|
setParentPointersInDirectChildren(node);
|
|
2541
2358
|
return node;
|
|
2542
2359
|
}
|
|
2543
2360
|
|
|
2544
|
-
export function ObjectTypeInternalSlot({
|
|
2545
|
-
parent,
|
|
2546
|
-
...props
|
|
2547
|
-
}: {
|
|
2361
|
+
export function ObjectTypeInternalSlot(props: {
|
|
2548
2362
|
...$ReadOnly<ObjectTypeInternalSlotProps>,
|
|
2549
2363
|
+parent?: ESNode,
|
|
2550
2364
|
}): DetachedNode<ObjectTypeInternalSlotType> {
|
|
2551
|
-
const node = detachedProps<ObjectTypeInternalSlotType>(parent, {
|
|
2365
|
+
const node = detachedProps<ObjectTypeInternalSlotType>(props.parent, {
|
|
2552
2366
|
type: 'ObjectTypeInternalSlot',
|
|
2553
|
-
|
|
2367
|
+
id: asDetachedNode(props.id),
|
|
2368
|
+
value: asDetachedNode(props.value),
|
|
2369
|
+
optional: props.optional,
|
|
2370
|
+
static: props.static,
|
|
2371
|
+
method: props.method,
|
|
2554
2372
|
});
|
|
2555
2373
|
setParentPointersInDirectChildren(node);
|
|
2556
2374
|
return node;
|
|
2557
2375
|
}
|
|
2558
2376
|
|
|
2559
|
-
export function ObjectTypeProperty({
|
|
2560
|
-
parent,
|
|
2561
|
-
...props
|
|
2562
|
-
}: {
|
|
2377
|
+
export function ObjectTypeProperty(props: {
|
|
2563
2378
|
...$ReadOnly<ObjectTypePropertyProps>,
|
|
2564
2379
|
+parent?: ESNode,
|
|
2565
2380
|
}): DetachedNode<ObjectTypePropertyType> {
|
|
2566
|
-
const node = detachedProps<ObjectTypePropertyType>(parent, {
|
|
2381
|
+
const node = detachedProps<ObjectTypePropertyType>(props.parent, {
|
|
2567
2382
|
type: 'ObjectTypeProperty',
|
|
2568
|
-
|
|
2383
|
+
key: asDetachedNode(props.key),
|
|
2384
|
+
value: asDetachedNode(props.value),
|
|
2385
|
+
method: props.method,
|
|
2386
|
+
optional: props.optional,
|
|
2387
|
+
static: props.static,
|
|
2388
|
+
proto: props.proto,
|
|
2389
|
+
variance: asDetachedNode(props.variance),
|
|
2390
|
+
kind: props.kind,
|
|
2569
2391
|
});
|
|
2570
2392
|
setParentPointersInDirectChildren(node);
|
|
2571
2393
|
return node;
|
|
2572
2394
|
}
|
|
2573
2395
|
|
|
2574
|
-
export function ObjectTypeSpreadProperty({
|
|
2575
|
-
parent,
|
|
2576
|
-
...props
|
|
2577
|
-
}: {
|
|
2396
|
+
export function ObjectTypeSpreadProperty(props: {
|
|
2578
2397
|
...$ReadOnly<ObjectTypeSpreadPropertyProps>,
|
|
2579
2398
|
+parent?: ESNode,
|
|
2580
2399
|
}): DetachedNode<ObjectTypeSpreadPropertyType> {
|
|
2581
|
-
const node = detachedProps<ObjectTypeSpreadPropertyType>(parent, {
|
|
2400
|
+
const node = detachedProps<ObjectTypeSpreadPropertyType>(props.parent, {
|
|
2582
2401
|
type: 'ObjectTypeSpreadProperty',
|
|
2583
|
-
|
|
2402
|
+
argument: asDetachedNode(props.argument),
|
|
2584
2403
|
});
|
|
2585
2404
|
setParentPointersInDirectChildren(node);
|
|
2586
2405
|
return node;
|
|
2587
2406
|
}
|
|
2588
2407
|
|
|
2589
|
-
export function OpaqueType({
|
|
2590
|
-
parent,
|
|
2591
|
-
...props
|
|
2592
|
-
}: {
|
|
2408
|
+
export function OpaqueType(props: {
|
|
2593
2409
|
...$ReadOnly<OpaqueTypeProps>,
|
|
2594
2410
|
+parent?: ESNode,
|
|
2595
2411
|
}): DetachedNode<OpaqueTypeType> {
|
|
2596
|
-
const node = detachedProps<OpaqueTypeType>(parent, {
|
|
2412
|
+
const node = detachedProps<OpaqueTypeType>(props.parent, {
|
|
2597
2413
|
type: 'OpaqueType',
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
}
|
|
2603
|
-
|
|
2604
|
-
export function OptionalCallExpression({
|
|
2605
|
-
parent,
|
|
2606
|
-
...props
|
|
2607
|
-
}: {
|
|
2608
|
-
...$ReadOnly<OptionalCallExpressionProps>,
|
|
2609
|
-
+parent?: ESNode,
|
|
2610
|
-
}): DetachedNode<OptionalCallExpressionType> {
|
|
2611
|
-
const node = detachedProps<OptionalCallExpressionType>(parent, {
|
|
2612
|
-
type: 'OptionalCallExpression',
|
|
2613
|
-
...props,
|
|
2414
|
+
id: asDetachedNode(props.id),
|
|
2415
|
+
typeParameters: asDetachedNode(props.typeParameters),
|
|
2416
|
+
impltype: asDetachedNode(props.impltype),
|
|
2417
|
+
supertype: asDetachedNode(props.supertype),
|
|
2614
2418
|
});
|
|
2615
2419
|
setParentPointersInDirectChildren(node);
|
|
2616
2420
|
return node;
|
|
2617
2421
|
}
|
|
2618
2422
|
|
|
2619
|
-
export function OptionalIndexedAccessType({
|
|
2620
|
-
parent,
|
|
2621
|
-
...props
|
|
2622
|
-
}: {
|
|
2423
|
+
export function OptionalIndexedAccessType(props: {
|
|
2623
2424
|
...$ReadOnly<OptionalIndexedAccessTypeProps>,
|
|
2624
2425
|
+parent?: ESNode,
|
|
2625
2426
|
}): DetachedNode<OptionalIndexedAccessTypeType> {
|
|
2626
|
-
const node = detachedProps<OptionalIndexedAccessTypeType>(parent, {
|
|
2427
|
+
const node = detachedProps<OptionalIndexedAccessTypeType>(props.parent, {
|
|
2627
2428
|
type: 'OptionalIndexedAccessType',
|
|
2628
|
-
|
|
2429
|
+
objectType: asDetachedNode(props.objectType),
|
|
2430
|
+
indexType: asDetachedNode(props.indexType),
|
|
2431
|
+
optional: props.optional,
|
|
2629
2432
|
});
|
|
2630
2433
|
setParentPointersInDirectChildren(node);
|
|
2631
2434
|
return node;
|
|
2632
2435
|
}
|
|
2633
2436
|
|
|
2634
|
-
export function
|
|
2635
|
-
|
|
2636
|
-
...props
|
|
2637
|
-
}: {
|
|
2638
|
-
...$ReadOnly<OptionalMemberExpressionProps>,
|
|
2437
|
+
export function PrivateIdentifier(props: {
|
|
2438
|
+
...$ReadOnly<PrivateIdentifierProps>,
|
|
2639
2439
|
+parent?: ESNode,
|
|
2640
|
-
}): DetachedNode<
|
|
2641
|
-
const node = detachedProps<
|
|
2642
|
-
type: '
|
|
2643
|
-
|
|
2440
|
+
}): DetachedNode<PrivateIdentifierType> {
|
|
2441
|
+
const node = detachedProps<PrivateIdentifierType>(props.parent, {
|
|
2442
|
+
type: 'PrivateIdentifier',
|
|
2443
|
+
name: props.name,
|
|
2644
2444
|
});
|
|
2645
2445
|
setParentPointersInDirectChildren(node);
|
|
2646
2446
|
return node;
|
|
2647
2447
|
}
|
|
2648
2448
|
|
|
2649
|
-
export function
|
|
2650
|
-
|
|
2651
|
-
...props
|
|
2652
|
-
}: {
|
|
2653
|
-
...$ReadOnly<PrivateNameProps>,
|
|
2449
|
+
export function Property(props: {
|
|
2450
|
+
...$ReadOnly<PropertyProps>,
|
|
2654
2451
|
+parent?: ESNode,
|
|
2655
|
-
}): DetachedNode<
|
|
2656
|
-
const node = detachedProps<
|
|
2657
|
-
type: '
|
|
2658
|
-
|
|
2452
|
+
}): DetachedNode<PropertyType> {
|
|
2453
|
+
const node = detachedProps<PropertyType>(props.parent, {
|
|
2454
|
+
type: 'Property',
|
|
2455
|
+
key: asDetachedNode(props.key),
|
|
2456
|
+
value: asDetachedNode(props.value),
|
|
2457
|
+
kind: props.kind,
|
|
2458
|
+
computed: props.computed,
|
|
2459
|
+
method: props.method,
|
|
2460
|
+
shorthand: props.shorthand,
|
|
2659
2461
|
});
|
|
2660
2462
|
setParentPointersInDirectChildren(node);
|
|
2661
2463
|
return node;
|
|
2662
2464
|
}
|
|
2663
2465
|
|
|
2664
|
-
export function
|
|
2665
|
-
|
|
2666
|
-
...props
|
|
2667
|
-
}: {
|
|
2668
|
-
...$ReadOnly<PropertyProps>,
|
|
2466
|
+
export function PropertyDefinition(props: {
|
|
2467
|
+
...$ReadOnly<PropertyDefinitionProps>,
|
|
2669
2468
|
+parent?: ESNode,
|
|
2670
|
-
}): DetachedNode<
|
|
2671
|
-
const node = detachedProps<
|
|
2672
|
-
type: '
|
|
2673
|
-
|
|
2469
|
+
}): DetachedNode<PropertyDefinitionType> {
|
|
2470
|
+
const node = detachedProps<PropertyDefinitionType>(props.parent, {
|
|
2471
|
+
type: 'PropertyDefinition',
|
|
2472
|
+
key: asDetachedNode(props.key),
|
|
2473
|
+
value: asDetachedNode(props.value),
|
|
2474
|
+
computed: props.computed,
|
|
2475
|
+
static: props.static,
|
|
2476
|
+
declare: props.declare,
|
|
2477
|
+
optional: props.optional,
|
|
2478
|
+
variance: asDetachedNode(props.variance),
|
|
2479
|
+
typeAnnotation: asDetachedNode(props.typeAnnotation),
|
|
2674
2480
|
});
|
|
2675
2481
|
setParentPointersInDirectChildren(node);
|
|
2676
2482
|
return node;
|
|
2677
2483
|
}
|
|
2678
2484
|
|
|
2679
|
-
export function QualifiedTypeIdentifier({
|
|
2680
|
-
parent,
|
|
2681
|
-
...props
|
|
2682
|
-
}: {
|
|
2485
|
+
export function QualifiedTypeIdentifier(props: {
|
|
2683
2486
|
...$ReadOnly<QualifiedTypeIdentifierProps>,
|
|
2684
2487
|
+parent?: ESNode,
|
|
2685
2488
|
}): DetachedNode<QualifiedTypeIdentifierType> {
|
|
2686
|
-
const node = detachedProps<QualifiedTypeIdentifierType>(parent, {
|
|
2489
|
+
const node = detachedProps<QualifiedTypeIdentifierType>(props.parent, {
|
|
2687
2490
|
type: 'QualifiedTypeIdentifier',
|
|
2688
|
-
|
|
2491
|
+
qualification: asDetachedNode(props.qualification),
|
|
2492
|
+
id: asDetachedNode(props.id),
|
|
2689
2493
|
});
|
|
2690
2494
|
setParentPointersInDirectChildren(node);
|
|
2691
2495
|
return node;
|
|
2692
2496
|
}
|
|
2693
2497
|
|
|
2694
|
-
export function RestElement({
|
|
2695
|
-
parent,
|
|
2696
|
-
...props
|
|
2697
|
-
}: {
|
|
2498
|
+
export function RestElement(props: {
|
|
2698
2499
|
...$ReadOnly<RestElementProps>,
|
|
2699
2500
|
+parent?: ESNode,
|
|
2700
2501
|
}): DetachedNode<RestElementType> {
|
|
2701
|
-
const node = detachedProps<RestElementType>(parent, {
|
|
2502
|
+
const node = detachedProps<RestElementType>(props.parent, {
|
|
2702
2503
|
type: 'RestElement',
|
|
2703
|
-
|
|
2504
|
+
argument: asDetachedNode(props.argument),
|
|
2704
2505
|
});
|
|
2705
2506
|
setParentPointersInDirectChildren(node);
|
|
2706
2507
|
return node;
|
|
2707
2508
|
}
|
|
2708
2509
|
|
|
2709
|
-
export function ReturnStatement({
|
|
2710
|
-
parent,
|
|
2711
|
-
...props
|
|
2712
|
-
}: {
|
|
2510
|
+
export function ReturnStatement(props: {
|
|
2713
2511
|
...$ReadOnly<ReturnStatementProps>,
|
|
2714
2512
|
+parent?: ESNode,
|
|
2715
2513
|
}): DetachedNode<ReturnStatementType> {
|
|
2716
|
-
const node = detachedProps<ReturnStatementType>(parent, {
|
|
2514
|
+
const node = detachedProps<ReturnStatementType>(props.parent, {
|
|
2717
2515
|
type: 'ReturnStatement',
|
|
2718
|
-
|
|
2516
|
+
argument: asDetachedNode(props.argument),
|
|
2719
2517
|
});
|
|
2720
2518
|
setParentPointersInDirectChildren(node);
|
|
2721
2519
|
return node;
|
|
2722
2520
|
}
|
|
2723
2521
|
|
|
2724
|
-
export function SequenceExpression({
|
|
2725
|
-
parent,
|
|
2726
|
-
...props
|
|
2727
|
-
}: {
|
|
2522
|
+
export function SequenceExpression(props: {
|
|
2728
2523
|
...$ReadOnly<SequenceExpressionProps>,
|
|
2729
2524
|
+parent?: ESNode,
|
|
2730
2525
|
}): DetachedNode<SequenceExpressionType> {
|
|
2731
|
-
const node = detachedProps<SequenceExpressionType>(parent, {
|
|
2526
|
+
const node = detachedProps<SequenceExpressionType>(props.parent, {
|
|
2732
2527
|
type: 'SequenceExpression',
|
|
2733
|
-
|
|
2528
|
+
expressions: props.expressions.map(n => asDetachedNode(n)),
|
|
2734
2529
|
});
|
|
2735
2530
|
setParentPointersInDirectChildren(node);
|
|
2736
2531
|
return node;
|
|
2737
2532
|
}
|
|
2738
2533
|
|
|
2739
|
-
export function SpreadElement({
|
|
2740
|
-
parent,
|
|
2741
|
-
...props
|
|
2742
|
-
}: {
|
|
2534
|
+
export function SpreadElement(props: {
|
|
2743
2535
|
...$ReadOnly<SpreadElementProps>,
|
|
2744
2536
|
+parent?: ESNode,
|
|
2745
2537
|
}): DetachedNode<SpreadElementType> {
|
|
2746
|
-
const node = detachedProps<SpreadElementType>(parent, {
|
|
2538
|
+
const node = detachedProps<SpreadElementType>(props.parent, {
|
|
2747
2539
|
type: 'SpreadElement',
|
|
2748
|
-
|
|
2540
|
+
argument: asDetachedNode(props.argument),
|
|
2749
2541
|
});
|
|
2750
2542
|
setParentPointersInDirectChildren(node);
|
|
2751
2543
|
return node;
|
|
2752
2544
|
}
|
|
2753
2545
|
|
|
2754
|
-
export function StringLiteralTypeAnnotation({
|
|
2755
|
-
parent,
|
|
2756
|
-
...props
|
|
2757
|
-
}: {
|
|
2546
|
+
export function StringLiteralTypeAnnotation(props: {
|
|
2758
2547
|
...$ReadOnly<StringLiteralTypeAnnotationProps>,
|
|
2759
2548
|
+parent?: ESNode,
|
|
2760
2549
|
}): DetachedNode<StringLiteralTypeAnnotationType> {
|
|
2761
|
-
const node = detachedProps<StringLiteralTypeAnnotationType>(parent, {
|
|
2550
|
+
const node = detachedProps<StringLiteralTypeAnnotationType>(props.parent, {
|
|
2762
2551
|
type: 'StringLiteralTypeAnnotation',
|
|
2763
|
-
|
|
2552
|
+
value: props.value,
|
|
2553
|
+
raw: props.raw,
|
|
2764
2554
|
});
|
|
2765
2555
|
setParentPointersInDirectChildren(node);
|
|
2766
2556
|
return node;
|
|
2767
2557
|
}
|
|
2768
2558
|
|
|
2769
|
-
export function StringTypeAnnotation(
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
return detachedProps<StringTypeAnnotationType>(parent, {
|
|
2559
|
+
export function StringTypeAnnotation(
|
|
2560
|
+
props: {
|
|
2561
|
+
+parent?: ESNode,
|
|
2562
|
+
} = {...null},
|
|
2563
|
+
): DetachedNode<StringTypeAnnotationType> {
|
|
2564
|
+
return detachedProps<StringTypeAnnotationType>(props.parent, {
|
|
2775
2565
|
type: 'StringTypeAnnotation',
|
|
2776
2566
|
});
|
|
2777
2567
|
}
|
|
2778
2568
|
|
|
2779
|
-
export function Super(
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
return detachedProps<SuperType>(parent, {
|
|
2569
|
+
export function Super(
|
|
2570
|
+
props: {
|
|
2571
|
+
+parent?: ESNode,
|
|
2572
|
+
} = {...null},
|
|
2573
|
+
): DetachedNode<SuperType> {
|
|
2574
|
+
return detachedProps<SuperType>(props.parent, {
|
|
2785
2575
|
type: 'Super',
|
|
2786
2576
|
});
|
|
2787
2577
|
}
|
|
2788
2578
|
|
|
2789
|
-
export function SwitchCase({
|
|
2790
|
-
parent,
|
|
2791
|
-
...props
|
|
2792
|
-
}: {
|
|
2579
|
+
export function SwitchCase(props: {
|
|
2793
2580
|
...$ReadOnly<SwitchCaseProps>,
|
|
2794
2581
|
+parent?: ESNode,
|
|
2795
2582
|
}): DetachedNode<SwitchCaseType> {
|
|
2796
|
-
const node = detachedProps<SwitchCaseType>(parent, {
|
|
2583
|
+
const node = detachedProps<SwitchCaseType>(props.parent, {
|
|
2797
2584
|
type: 'SwitchCase',
|
|
2798
|
-
|
|
2585
|
+
test: asDetachedNode(props.test),
|
|
2586
|
+
consequent: props.consequent.map(n => asDetachedNode(n)),
|
|
2799
2587
|
});
|
|
2800
2588
|
setParentPointersInDirectChildren(node);
|
|
2801
2589
|
return node;
|
|
2802
2590
|
}
|
|
2803
2591
|
|
|
2804
|
-
export function SwitchStatement({
|
|
2805
|
-
parent,
|
|
2806
|
-
...props
|
|
2807
|
-
}: {
|
|
2592
|
+
export function SwitchStatement(props: {
|
|
2808
2593
|
...$ReadOnly<SwitchStatementProps>,
|
|
2809
2594
|
+parent?: ESNode,
|
|
2810
2595
|
}): DetachedNode<SwitchStatementType> {
|
|
2811
|
-
const node = detachedProps<SwitchStatementType>(parent, {
|
|
2596
|
+
const node = detachedProps<SwitchStatementType>(props.parent, {
|
|
2812
2597
|
type: 'SwitchStatement',
|
|
2813
|
-
|
|
2598
|
+
discriminant: asDetachedNode(props.discriminant),
|
|
2599
|
+
cases: props.cases.map(n => asDetachedNode(n)),
|
|
2814
2600
|
});
|
|
2815
2601
|
setParentPointersInDirectChildren(node);
|
|
2816
2602
|
return node;
|
|
2817
2603
|
}
|
|
2818
2604
|
|
|
2819
|
-
export function SymbolTypeAnnotation(
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
return detachedProps<SymbolTypeAnnotationType>(parent, {
|
|
2605
|
+
export function SymbolTypeAnnotation(
|
|
2606
|
+
props: {
|
|
2607
|
+
+parent?: ESNode,
|
|
2608
|
+
} = {...null},
|
|
2609
|
+
): DetachedNode<SymbolTypeAnnotationType> {
|
|
2610
|
+
return detachedProps<SymbolTypeAnnotationType>(props.parent, {
|
|
2825
2611
|
type: 'SymbolTypeAnnotation',
|
|
2826
2612
|
});
|
|
2827
2613
|
}
|
|
2828
2614
|
|
|
2829
|
-
export function TaggedTemplateExpression({
|
|
2830
|
-
parent,
|
|
2831
|
-
...props
|
|
2832
|
-
}: {
|
|
2615
|
+
export function TaggedTemplateExpression(props: {
|
|
2833
2616
|
...$ReadOnly<TaggedTemplateExpressionProps>,
|
|
2834
2617
|
+parent?: ESNode,
|
|
2835
2618
|
}): DetachedNode<TaggedTemplateExpressionType> {
|
|
2836
|
-
const node = detachedProps<TaggedTemplateExpressionType>(parent, {
|
|
2619
|
+
const node = detachedProps<TaggedTemplateExpressionType>(props.parent, {
|
|
2837
2620
|
type: 'TaggedTemplateExpression',
|
|
2838
|
-
|
|
2621
|
+
tag: asDetachedNode(props.tag),
|
|
2622
|
+
quasi: asDetachedNode(props.quasi),
|
|
2839
2623
|
});
|
|
2840
2624
|
setParentPointersInDirectChildren(node);
|
|
2841
2625
|
return node;
|
|
2842
2626
|
}
|
|
2843
2627
|
|
|
2844
|
-
export function TemplateLiteral({
|
|
2845
|
-
parent,
|
|
2846
|
-
...props
|
|
2847
|
-
}: {
|
|
2628
|
+
export function TemplateLiteral(props: {
|
|
2848
2629
|
...$ReadOnly<TemplateLiteralProps>,
|
|
2849
2630
|
+parent?: ESNode,
|
|
2850
2631
|
}): DetachedNode<TemplateLiteralType> {
|
|
2851
|
-
const node = detachedProps<TemplateLiteralType>(parent, {
|
|
2632
|
+
const node = detachedProps<TemplateLiteralType>(props.parent, {
|
|
2852
2633
|
type: 'TemplateLiteral',
|
|
2853
|
-
|
|
2634
|
+
quasis: props.quasis.map(n => asDetachedNode(n)),
|
|
2635
|
+
expressions: props.expressions.map(n => asDetachedNode(n)),
|
|
2854
2636
|
});
|
|
2855
2637
|
setParentPointersInDirectChildren(node);
|
|
2856
2638
|
return node;
|
|
2857
2639
|
}
|
|
2858
2640
|
|
|
2859
|
-
export function ThisExpression(
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
return detachedProps<ThisExpressionType>(parent, {
|
|
2641
|
+
export function ThisExpression(
|
|
2642
|
+
props: {
|
|
2643
|
+
+parent?: ESNode,
|
|
2644
|
+
} = {...null},
|
|
2645
|
+
): DetachedNode<ThisExpressionType> {
|
|
2646
|
+
return detachedProps<ThisExpressionType>(props.parent, {
|
|
2865
2647
|
type: 'ThisExpression',
|
|
2866
2648
|
});
|
|
2867
2649
|
}
|
|
2868
2650
|
|
|
2869
|
-
export function ThisTypeAnnotation(
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
return detachedProps<ThisTypeAnnotationType>(parent, {
|
|
2651
|
+
export function ThisTypeAnnotation(
|
|
2652
|
+
props: {
|
|
2653
|
+
+parent?: ESNode,
|
|
2654
|
+
} = {...null},
|
|
2655
|
+
): DetachedNode<ThisTypeAnnotationType> {
|
|
2656
|
+
return detachedProps<ThisTypeAnnotationType>(props.parent, {
|
|
2875
2657
|
type: 'ThisTypeAnnotation',
|
|
2876
2658
|
});
|
|
2877
2659
|
}
|
|
2878
2660
|
|
|
2879
|
-
export function ThrowStatement({
|
|
2880
|
-
parent,
|
|
2881
|
-
...props
|
|
2882
|
-
}: {
|
|
2661
|
+
export function ThrowStatement(props: {
|
|
2883
2662
|
...$ReadOnly<ThrowStatementProps>,
|
|
2884
2663
|
+parent?: ESNode,
|
|
2885
2664
|
}): DetachedNode<ThrowStatementType> {
|
|
2886
|
-
const node = detachedProps<ThrowStatementType>(parent, {
|
|
2665
|
+
const node = detachedProps<ThrowStatementType>(props.parent, {
|
|
2887
2666
|
type: 'ThrowStatement',
|
|
2888
|
-
|
|
2667
|
+
argument: asDetachedNode(props.argument),
|
|
2889
2668
|
});
|
|
2890
2669
|
setParentPointersInDirectChildren(node);
|
|
2891
2670
|
return node;
|
|
2892
2671
|
}
|
|
2893
2672
|
|
|
2894
|
-
export function TryStatement({
|
|
2895
|
-
parent,
|
|
2896
|
-
...props
|
|
2897
|
-
}: {
|
|
2673
|
+
export function TryStatement(props: {
|
|
2898
2674
|
...$ReadOnly<TryStatementProps>,
|
|
2899
2675
|
+parent?: ESNode,
|
|
2900
2676
|
}): DetachedNode<TryStatementType> {
|
|
2901
|
-
const node = detachedProps<TryStatementType>(parent, {
|
|
2677
|
+
const node = detachedProps<TryStatementType>(props.parent, {
|
|
2902
2678
|
type: 'TryStatement',
|
|
2903
|
-
|
|
2679
|
+
block: asDetachedNode(props.block),
|
|
2680
|
+
handler: asDetachedNode(props.handler),
|
|
2681
|
+
finalizer: asDetachedNode(props.finalizer),
|
|
2904
2682
|
});
|
|
2905
2683
|
setParentPointersInDirectChildren(node);
|
|
2906
2684
|
return node;
|
|
2907
2685
|
}
|
|
2908
2686
|
|
|
2909
|
-
export function TupleTypeAnnotation({
|
|
2910
|
-
parent,
|
|
2911
|
-
...props
|
|
2912
|
-
}: {
|
|
2687
|
+
export function TupleTypeAnnotation(props: {
|
|
2913
2688
|
...$ReadOnly<TupleTypeAnnotationProps>,
|
|
2914
2689
|
+parent?: ESNode,
|
|
2915
2690
|
}): DetachedNode<TupleTypeAnnotationType> {
|
|
2916
|
-
const node = detachedProps<TupleTypeAnnotationType>(parent, {
|
|
2691
|
+
const node = detachedProps<TupleTypeAnnotationType>(props.parent, {
|
|
2917
2692
|
type: 'TupleTypeAnnotation',
|
|
2918
|
-
|
|
2693
|
+
types: props.types.map(n => asDetachedNode(n)),
|
|
2919
2694
|
});
|
|
2920
2695
|
setParentPointersInDirectChildren(node);
|
|
2921
2696
|
return node;
|
|
2922
2697
|
}
|
|
2923
2698
|
|
|
2924
|
-
export function TypeAlias({
|
|
2925
|
-
parent,
|
|
2926
|
-
...props
|
|
2927
|
-
}: {
|
|
2699
|
+
export function TypeAlias(props: {
|
|
2928
2700
|
...$ReadOnly<TypeAliasProps>,
|
|
2929
2701
|
+parent?: ESNode,
|
|
2930
2702
|
}): DetachedNode<TypeAliasType> {
|
|
2931
|
-
const node = detachedProps<TypeAliasType>(parent, {
|
|
2703
|
+
const node = detachedProps<TypeAliasType>(props.parent, {
|
|
2932
2704
|
type: 'TypeAlias',
|
|
2933
|
-
|
|
2705
|
+
id: asDetachedNode(props.id),
|
|
2706
|
+
typeParameters: asDetachedNode(props.typeParameters),
|
|
2707
|
+
right: asDetachedNode(props.right),
|
|
2934
2708
|
});
|
|
2935
2709
|
setParentPointersInDirectChildren(node);
|
|
2936
2710
|
return node;
|
|
2937
2711
|
}
|
|
2938
2712
|
|
|
2939
|
-
export function TypeAnnotation({
|
|
2940
|
-
parent,
|
|
2941
|
-
...props
|
|
2942
|
-
}: {
|
|
2713
|
+
export function TypeAnnotation(props: {
|
|
2943
2714
|
...$ReadOnly<TypeAnnotationProps>,
|
|
2944
2715
|
+parent?: ESNode,
|
|
2945
2716
|
}): DetachedNode<TypeAnnotationType> {
|
|
2946
|
-
const node = detachedProps<TypeAnnotationType>(parent, {
|
|
2717
|
+
const node = detachedProps<TypeAnnotationType>(props.parent, {
|
|
2947
2718
|
type: 'TypeAnnotation',
|
|
2948
|
-
|
|
2719
|
+
typeAnnotation: asDetachedNode(props.typeAnnotation),
|
|
2949
2720
|
});
|
|
2950
2721
|
setParentPointersInDirectChildren(node);
|
|
2951
2722
|
return node;
|
|
2952
2723
|
}
|
|
2953
2724
|
|
|
2954
|
-
export function TypeCastExpression({
|
|
2955
|
-
parent,
|
|
2956
|
-
...props
|
|
2957
|
-
}: {
|
|
2725
|
+
export function TypeCastExpression(props: {
|
|
2958
2726
|
...$ReadOnly<TypeCastExpressionProps>,
|
|
2959
2727
|
+parent?: ESNode,
|
|
2960
2728
|
}): DetachedNode<TypeCastExpressionType> {
|
|
2961
|
-
const node = detachedProps<TypeCastExpressionType>(parent, {
|
|
2729
|
+
const node = detachedProps<TypeCastExpressionType>(props.parent, {
|
|
2962
2730
|
type: 'TypeCastExpression',
|
|
2963
|
-
|
|
2731
|
+
expression: asDetachedNode(props.expression),
|
|
2732
|
+
typeAnnotation: asDetachedNode(props.typeAnnotation),
|
|
2964
2733
|
});
|
|
2965
2734
|
setParentPointersInDirectChildren(node);
|
|
2966
2735
|
return node;
|
|
2967
2736
|
}
|
|
2968
2737
|
|
|
2969
|
-
export function TypeofTypeAnnotation({
|
|
2970
|
-
parent,
|
|
2971
|
-
...props
|
|
2972
|
-
}: {
|
|
2738
|
+
export function TypeofTypeAnnotation(props: {
|
|
2973
2739
|
...$ReadOnly<TypeofTypeAnnotationProps>,
|
|
2974
2740
|
+parent?: ESNode,
|
|
2975
2741
|
}): DetachedNode<TypeofTypeAnnotationType> {
|
|
2976
|
-
const node = detachedProps<TypeofTypeAnnotationType>(parent, {
|
|
2742
|
+
const node = detachedProps<TypeofTypeAnnotationType>(props.parent, {
|
|
2977
2743
|
type: 'TypeofTypeAnnotation',
|
|
2978
|
-
|
|
2744
|
+
argument: asDetachedNode(props.argument),
|
|
2979
2745
|
});
|
|
2980
2746
|
setParentPointersInDirectChildren(node);
|
|
2981
2747
|
return node;
|
|
2982
2748
|
}
|
|
2983
2749
|
|
|
2984
|
-
export function TypeParameter({
|
|
2985
|
-
parent,
|
|
2986
|
-
...props
|
|
2987
|
-
}: {
|
|
2750
|
+
export function TypeParameter(props: {
|
|
2988
2751
|
...$ReadOnly<TypeParameterProps>,
|
|
2989
2752
|
+parent?: ESNode,
|
|
2990
2753
|
}): DetachedNode<TypeParameterType> {
|
|
2991
|
-
const node = detachedProps<TypeParameterType>(parent, {
|
|
2754
|
+
const node = detachedProps<TypeParameterType>(props.parent, {
|
|
2992
2755
|
type: 'TypeParameter',
|
|
2993
|
-
|
|
2756
|
+
name: props.name,
|
|
2757
|
+
bound: asDetachedNode(props.bound),
|
|
2758
|
+
variance: asDetachedNode(props.variance),
|
|
2759
|
+
default: asDetachedNode(props.default),
|
|
2994
2760
|
});
|
|
2995
2761
|
setParentPointersInDirectChildren(node);
|
|
2996
2762
|
return node;
|
|
2997
2763
|
}
|
|
2998
2764
|
|
|
2999
|
-
export function TypeParameterDeclaration({
|
|
3000
|
-
parent,
|
|
3001
|
-
...props
|
|
3002
|
-
}: {
|
|
2765
|
+
export function TypeParameterDeclaration(props: {
|
|
3003
2766
|
...$ReadOnly<TypeParameterDeclarationProps>,
|
|
3004
2767
|
+parent?: ESNode,
|
|
3005
2768
|
}): DetachedNode<TypeParameterDeclarationType> {
|
|
3006
|
-
const node = detachedProps<TypeParameterDeclarationType>(parent, {
|
|
2769
|
+
const node = detachedProps<TypeParameterDeclarationType>(props.parent, {
|
|
3007
2770
|
type: 'TypeParameterDeclaration',
|
|
3008
|
-
|
|
2771
|
+
params: props.params.map(n => asDetachedNode(n)),
|
|
3009
2772
|
});
|
|
3010
2773
|
setParentPointersInDirectChildren(node);
|
|
3011
2774
|
return node;
|
|
3012
2775
|
}
|
|
3013
2776
|
|
|
3014
|
-
export function TypeParameterInstantiation({
|
|
3015
|
-
parent,
|
|
3016
|
-
...props
|
|
3017
|
-
}: {
|
|
2777
|
+
export function TypeParameterInstantiation(props: {
|
|
3018
2778
|
...$ReadOnly<TypeParameterInstantiationProps>,
|
|
3019
2779
|
+parent?: ESNode,
|
|
3020
2780
|
}): DetachedNode<TypeParameterInstantiationType> {
|
|
3021
|
-
const node = detachedProps<TypeParameterInstantiationType>(parent, {
|
|
2781
|
+
const node = detachedProps<TypeParameterInstantiationType>(props.parent, {
|
|
3022
2782
|
type: 'TypeParameterInstantiation',
|
|
3023
|
-
|
|
2783
|
+
params: props.params.map(n => asDetachedNode(n)),
|
|
3024
2784
|
});
|
|
3025
2785
|
setParentPointersInDirectChildren(node);
|
|
3026
2786
|
return node;
|
|
3027
2787
|
}
|
|
3028
2788
|
|
|
3029
|
-
export function UnaryExpression({
|
|
3030
|
-
parent,
|
|
3031
|
-
...props
|
|
3032
|
-
}: {
|
|
2789
|
+
export function UnaryExpression(props: {
|
|
3033
2790
|
...$ReadOnly<UnaryExpressionProps>,
|
|
3034
2791
|
+parent?: ESNode,
|
|
3035
2792
|
}): DetachedNode<UnaryExpressionType> {
|
|
3036
|
-
const node = detachedProps<UnaryExpressionType>(parent, {
|
|
2793
|
+
const node = detachedProps<UnaryExpressionType>(props.parent, {
|
|
3037
2794
|
type: 'UnaryExpression',
|
|
3038
|
-
|
|
2795
|
+
operator: props.operator,
|
|
2796
|
+
argument: asDetachedNode(props.argument),
|
|
2797
|
+
prefix: props.prefix,
|
|
3039
2798
|
});
|
|
3040
2799
|
setParentPointersInDirectChildren(node);
|
|
3041
2800
|
return node;
|
|
3042
2801
|
}
|
|
3043
2802
|
|
|
3044
|
-
export function UnionTypeAnnotation({
|
|
3045
|
-
parent,
|
|
3046
|
-
...props
|
|
3047
|
-
}: {
|
|
2803
|
+
export function UnionTypeAnnotation(props: {
|
|
3048
2804
|
...$ReadOnly<UnionTypeAnnotationProps>,
|
|
3049
2805
|
+parent?: ESNode,
|
|
3050
2806
|
}): DetachedNode<UnionTypeAnnotationType> {
|
|
3051
|
-
const node = detachedProps<UnionTypeAnnotationType>(parent, {
|
|
2807
|
+
const node = detachedProps<UnionTypeAnnotationType>(props.parent, {
|
|
3052
2808
|
type: 'UnionTypeAnnotation',
|
|
3053
|
-
|
|
2809
|
+
types: props.types.map(n => asDetachedNode(n)),
|
|
3054
2810
|
});
|
|
3055
2811
|
setParentPointersInDirectChildren(node);
|
|
3056
2812
|
return node;
|
|
3057
2813
|
}
|
|
3058
2814
|
|
|
3059
|
-
export function UpdateExpression({
|
|
3060
|
-
parent,
|
|
3061
|
-
...props
|
|
3062
|
-
}: {
|
|
2815
|
+
export function UpdateExpression(props: {
|
|
3063
2816
|
...$ReadOnly<UpdateExpressionProps>,
|
|
3064
2817
|
+parent?: ESNode,
|
|
3065
2818
|
}): DetachedNode<UpdateExpressionType> {
|
|
3066
|
-
const node = detachedProps<UpdateExpressionType>(parent, {
|
|
2819
|
+
const node = detachedProps<UpdateExpressionType>(props.parent, {
|
|
3067
2820
|
type: 'UpdateExpression',
|
|
3068
|
-
|
|
2821
|
+
operator: props.operator,
|
|
2822
|
+
argument: asDetachedNode(props.argument),
|
|
2823
|
+
prefix: props.prefix,
|
|
3069
2824
|
});
|
|
3070
2825
|
setParentPointersInDirectChildren(node);
|
|
3071
2826
|
return node;
|
|
3072
2827
|
}
|
|
3073
2828
|
|
|
3074
|
-
export function VariableDeclaration({
|
|
3075
|
-
parent,
|
|
3076
|
-
...props
|
|
3077
|
-
}: {
|
|
2829
|
+
export function VariableDeclaration(props: {
|
|
3078
2830
|
...$ReadOnly<VariableDeclarationProps>,
|
|
3079
2831
|
+parent?: ESNode,
|
|
3080
2832
|
}): DetachedNode<VariableDeclarationType> {
|
|
3081
|
-
const node = detachedProps<VariableDeclarationType>(parent, {
|
|
2833
|
+
const node = detachedProps<VariableDeclarationType>(props.parent, {
|
|
3082
2834
|
type: 'VariableDeclaration',
|
|
3083
|
-
|
|
2835
|
+
kind: props.kind,
|
|
2836
|
+
declarations: props.declarations.map(n => asDetachedNode(n)),
|
|
3084
2837
|
});
|
|
3085
2838
|
setParentPointersInDirectChildren(node);
|
|
3086
2839
|
return node;
|
|
3087
2840
|
}
|
|
3088
2841
|
|
|
3089
|
-
export function VariableDeclarator({
|
|
3090
|
-
parent,
|
|
3091
|
-
...props
|
|
3092
|
-
}: {
|
|
2842
|
+
export function VariableDeclarator(props: {
|
|
3093
2843
|
...$ReadOnly<VariableDeclaratorProps>,
|
|
3094
2844
|
+parent?: ESNode,
|
|
3095
2845
|
}): DetachedNode<VariableDeclaratorType> {
|
|
3096
|
-
const node = detachedProps<VariableDeclaratorType>(parent, {
|
|
2846
|
+
const node = detachedProps<VariableDeclaratorType>(props.parent, {
|
|
3097
2847
|
type: 'VariableDeclarator',
|
|
3098
|
-
|
|
2848
|
+
init: asDetachedNode(props.init),
|
|
2849
|
+
id: asDetachedNode(props.id),
|
|
3099
2850
|
});
|
|
3100
2851
|
setParentPointersInDirectChildren(node);
|
|
3101
2852
|
return node;
|
|
3102
2853
|
}
|
|
3103
2854
|
|
|
3104
|
-
export function Variance({
|
|
3105
|
-
parent,
|
|
3106
|
-
...props
|
|
3107
|
-
}: {
|
|
2855
|
+
export function Variance(props: {
|
|
3108
2856
|
...$ReadOnly<VarianceProps>,
|
|
3109
2857
|
+parent?: ESNode,
|
|
3110
2858
|
}): DetachedNode<VarianceType> {
|
|
3111
|
-
const node = detachedProps<VarianceType>(parent, {
|
|
2859
|
+
const node = detachedProps<VarianceType>(props.parent, {
|
|
3112
2860
|
type: 'Variance',
|
|
3113
|
-
|
|
2861
|
+
kind: props.kind,
|
|
3114
2862
|
});
|
|
3115
2863
|
setParentPointersInDirectChildren(node);
|
|
3116
2864
|
return node;
|
|
3117
2865
|
}
|
|
3118
2866
|
|
|
3119
|
-
export function VoidTypeAnnotation(
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
return detachedProps<VoidTypeAnnotationType>(parent, {
|
|
2867
|
+
export function VoidTypeAnnotation(
|
|
2868
|
+
props: {
|
|
2869
|
+
+parent?: ESNode,
|
|
2870
|
+
} = {...null},
|
|
2871
|
+
): DetachedNode<VoidTypeAnnotationType> {
|
|
2872
|
+
return detachedProps<VoidTypeAnnotationType>(props.parent, {
|
|
3125
2873
|
type: 'VoidTypeAnnotation',
|
|
3126
2874
|
});
|
|
3127
2875
|
}
|
|
3128
2876
|
|
|
3129
|
-
export function WhileStatement({
|
|
3130
|
-
parent,
|
|
3131
|
-
...props
|
|
3132
|
-
}: {
|
|
2877
|
+
export function WhileStatement(props: {
|
|
3133
2878
|
...$ReadOnly<WhileStatementProps>,
|
|
3134
2879
|
+parent?: ESNode,
|
|
3135
2880
|
}): DetachedNode<WhileStatementType> {
|
|
3136
|
-
const node = detachedProps<WhileStatementType>(parent, {
|
|
2881
|
+
const node = detachedProps<WhileStatementType>(props.parent, {
|
|
3137
2882
|
type: 'WhileStatement',
|
|
3138
|
-
|
|
2883
|
+
body: asDetachedNode(props.body),
|
|
2884
|
+
test: asDetachedNode(props.test),
|
|
3139
2885
|
});
|
|
3140
2886
|
setParentPointersInDirectChildren(node);
|
|
3141
2887
|
return node;
|
|
3142
2888
|
}
|
|
3143
2889
|
|
|
3144
|
-
export function WithStatement({
|
|
3145
|
-
parent,
|
|
3146
|
-
...props
|
|
3147
|
-
}: {
|
|
2890
|
+
export function WithStatement(props: {
|
|
3148
2891
|
...$ReadOnly<WithStatementProps>,
|
|
3149
2892
|
+parent?: ESNode,
|
|
3150
2893
|
}): DetachedNode<WithStatementType> {
|
|
3151
|
-
const node = detachedProps<WithStatementType>(parent, {
|
|
2894
|
+
const node = detachedProps<WithStatementType>(props.parent, {
|
|
3152
2895
|
type: 'WithStatement',
|
|
3153
|
-
|
|
2896
|
+
object: asDetachedNode(props.object),
|
|
2897
|
+
body: asDetachedNode(props.body),
|
|
3154
2898
|
});
|
|
3155
2899
|
setParentPointersInDirectChildren(node);
|
|
3156
2900
|
return node;
|
|
3157
2901
|
}
|
|
3158
2902
|
|
|
3159
|
-
export function YieldExpression({
|
|
3160
|
-
parent,
|
|
3161
|
-
...props
|
|
3162
|
-
}: {
|
|
2903
|
+
export function YieldExpression(props: {
|
|
3163
2904
|
...$ReadOnly<YieldExpressionProps>,
|
|
3164
2905
|
+parent?: ESNode,
|
|
3165
2906
|
}): DetachedNode<YieldExpressionType> {
|
|
3166
|
-
const node = detachedProps<YieldExpressionType>(parent, {
|
|
2907
|
+
const node = detachedProps<YieldExpressionType>(props.parent, {
|
|
3167
2908
|
type: 'YieldExpression',
|
|
3168
|
-
|
|
2909
|
+
argument: asDetachedNode(props.argument),
|
|
2910
|
+
delegate: props.delegate,
|
|
3169
2911
|
});
|
|
3170
2912
|
setParentPointersInDirectChildren(node);
|
|
3171
2913
|
return node;
|