hermes-transform 0.8.0 → 0.9.0

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