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