hermes-transform 0.6.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/ESLINT_LICENCE +19 -0
  2. package/PRETTIER_LICENCE +7 -0
  3. package/dist/detachedNode.js +96 -20
  4. package/dist/detachedNode.js.flow +105 -17
  5. package/dist/generated/TransformCloneSignatures.js.flow +33 -66
  6. package/dist/generated/TransformModifySignatures.js.flow +1113 -0
  7. package/dist/generated/TransformReplaceSignatures.js.flow +19 -40
  8. package/dist/generated/node-types.js +638 -905
  9. package/dist/generated/node-types.js.flow +998 -1256
  10. package/dist/generated/special-case-node-types.js +71 -77
  11. package/dist/generated/special-case-node-types.js.flow +104 -88
  12. package/dist/index.js.flow +2 -1
  13. package/dist/transform/MutationContext.js +2 -2
  14. package/dist/transform/MutationContext.js.flow +3 -2
  15. package/dist/transform/TransformContext.js +56 -43
  16. package/dist/transform/TransformContext.js.flow +154 -95
  17. package/dist/transform/comments/comments.js +133 -28
  18. package/dist/transform/comments/comments.js.flow +125 -28
  19. package/dist/transform/getTransformedAST.js +20 -12
  20. package/dist/transform/getTransformedAST.js.flow +32 -14
  21. package/dist/transform/mutations/{AddLeadingComments.js → AddComments.js} +11 -8
  22. package/dist/transform/mutations/AddComments.js.flow +50 -0
  23. package/dist/transform/mutations/CloneCommentsTo.js +1 -2
  24. package/dist/transform/mutations/CloneCommentsTo.js.flow +1 -2
  25. package/dist/transform/mutations/InsertStatement.js +3 -1
  26. package/dist/transform/mutations/InsertStatement.js.flow +7 -1
  27. package/dist/transform/mutations/RemoveNode.js +10 -3
  28. package/dist/transform/mutations/RemoveNode.js.flow +14 -3
  29. package/dist/transform/mutations/ReplaceNode.js +7 -2
  30. package/dist/transform/mutations/ReplaceNode.js.flow +5 -2
  31. package/dist/transform/mutations/ReplaceStatementWithMany.js.flow +5 -2
  32. package/dist/transform/mutations/utils/arrayUtils.js +14 -0
  33. package/dist/transform/mutations/utils/arrayUtils.js.flow +15 -0
  34. package/dist/transform/transform.js +38 -6
  35. package/dist/transform/transform.js.flow +40 -6
  36. package/dist/traverse/NodeEventGenerator.js.flow +1 -1
  37. package/dist/traverse/traverse.js +27 -3
  38. package/dist/traverse/traverse.js.flow +63 -10
  39. package/package.json +9 -4
  40. package/dist/transform/mutations/AddLeadingComments.js.flow +0 -49
  41. package/dist/transform/mutations/AddTrailingComments.js +0 -40
  42. package/dist/transform/mutations/AddTrailingComments.js.flow +0 -49
@@ -33,12 +33,10 @@ var _exportNames = {
33
33
  BreakStatement: true,
34
34
  CallExpression: true,
35
35
  CatchClause: true,
36
+ ChainExpression: true,
36
37
  ClassBody: true,
37
- ClassDeclaration: true,
38
38
  ClassExpression: true,
39
39
  ClassImplements: true,
40
- ClassPrivateProperty: true,
41
- ClassProperty: true,
42
40
  ConditionalExpression: true,
43
41
  ContinueStatement: true,
44
42
  DebuggerStatement: true,
@@ -69,7 +67,6 @@ var _exportNames = {
69
67
  ExportAllDeclaration: true,
70
68
  ExportDefaultDeclaration: true,
71
69
  ExportNamedDeclaration: true,
72
- ExportNamespaceSpecifier: true,
73
70
  ExportSpecifier: true,
74
71
  ExpressionStatement: true,
75
72
  ForInStatement: true,
@@ -128,11 +125,10 @@ var _exportNames = {
128
125
  ObjectTypeProperty: true,
129
126
  ObjectTypeSpreadProperty: true,
130
127
  OpaqueType: true,
131
- OptionalCallExpression: true,
132
128
  OptionalIndexedAccessType: true,
133
- OptionalMemberExpression: true,
134
- PrivateName: true,
129
+ PrivateIdentifier: true,
135
130
  Property: true,
131
+ PropertyDefinition: true,
136
132
  QualifiedTypeIdentifier: true,
137
133
  RestElement: true,
138
134
  ReturnStatement: true,
@@ -184,12 +180,10 @@ exports.BooleanTypeAnnotation = BooleanTypeAnnotation;
184
180
  exports.BreakStatement = BreakStatement;
185
181
  exports.CallExpression = CallExpression;
186
182
  exports.CatchClause = CatchClause;
183
+ exports.ChainExpression = ChainExpression;
187
184
  exports.ClassBody = ClassBody;
188
- exports.ClassDeclaration = ClassDeclaration;
189
185
  exports.ClassExpression = ClassExpression;
190
186
  exports.ClassImplements = ClassImplements;
191
- exports.ClassPrivateProperty = ClassPrivateProperty;
192
- exports.ClassProperty = ClassProperty;
193
187
  exports.ConditionalExpression = ConditionalExpression;
194
188
  exports.ContinueStatement = ContinueStatement;
195
189
  exports.DebuggerStatement = DebuggerStatement;
@@ -220,7 +214,6 @@ exports.ExistsTypeAnnotation = ExistsTypeAnnotation;
220
214
  exports.ExportAllDeclaration = ExportAllDeclaration;
221
215
  exports.ExportDefaultDeclaration = ExportDefaultDeclaration;
222
216
  exports.ExportNamedDeclaration = ExportNamedDeclaration;
223
- exports.ExportNamespaceSpecifier = ExportNamespaceSpecifier;
224
217
  exports.ExportSpecifier = ExportSpecifier;
225
218
  exports.ExpressionStatement = ExpressionStatement;
226
219
  exports.ForInStatement = ForInStatement;
@@ -279,11 +272,10 @@ exports.ObjectTypeInternalSlot = ObjectTypeInternalSlot;
279
272
  exports.ObjectTypeProperty = ObjectTypeProperty;
280
273
  exports.ObjectTypeSpreadProperty = ObjectTypeSpreadProperty;
281
274
  exports.OpaqueType = OpaqueType;
282
- exports.OptionalCallExpression = OptionalCallExpression;
283
275
  exports.OptionalIndexedAccessType = OptionalIndexedAccessType;
284
- exports.OptionalMemberExpression = OptionalMemberExpression;
285
- exports.PrivateName = PrivateName;
276
+ exports.PrivateIdentifier = PrivateIdentifier;
286
277
  exports.Property = Property;
278
+ exports.PropertyDefinition = PropertyDefinition;
287
279
  exports.QualifiedTypeIdentifier = QualifiedTypeIdentifier;
288
280
  exports.RestElement = RestElement;
289
281
  exports.ReturnStatement = ReturnStatement;
@@ -331,1725 +323,1466 @@ Object.keys(_specialCaseNodeTypes).forEach(function (key) {
331
323
  exports[key] = _specialCaseNodeTypes[key];
332
324
  });
333
325
 
334
- function AnyTypeAnnotation({
335
- parent
336
- } = {}) {
337
- return (0, _detachedNode.detachedProps)(parent, {
326
+ function AnyTypeAnnotation(props = { ...null
327
+ }) {
328
+ return (0, _detachedNode.detachedProps)(props.parent, {
338
329
  type: 'AnyTypeAnnotation'
339
330
  });
340
331
  }
341
332
 
342
- function ArrayExpression({
343
- parent,
344
- ...props
345
- }) {
346
- const node = (0, _detachedNode.detachedProps)(parent, {
333
+ function ArrayExpression(props) {
334
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
347
335
  type: 'ArrayExpression',
348
- ...props
336
+ elements: props.elements.map(n => (0, _detachedNode.asDetachedNode)(n)),
337
+ trailingComma: props.trailingComma
349
338
  });
350
339
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
351
340
  return node;
352
341
  }
353
342
 
354
- function ArrayPattern({
355
- parent,
356
- ...props
357
- }) {
358
- const node = (0, _detachedNode.detachedProps)(parent, {
343
+ function ArrayPattern(props) {
344
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
359
345
  type: 'ArrayPattern',
360
- ...props
346
+ elements: props.elements.map(n => (0, _detachedNode.asDetachedNode)(n)),
347
+ typeAnnotation: (0, _detachedNode.asDetachedNode)(props.typeAnnotation)
361
348
  });
362
349
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
363
350
  return node;
364
351
  }
365
352
 
366
- function ArrayTypeAnnotation({
367
- parent,
368
- ...props
369
- }) {
370
- const node = (0, _detachedNode.detachedProps)(parent, {
353
+ function ArrayTypeAnnotation(props) {
354
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
371
355
  type: 'ArrayTypeAnnotation',
372
- ...props
356
+ elementType: (0, _detachedNode.asDetachedNode)(props.elementType)
373
357
  });
374
358
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
375
359
  return node;
376
360
  }
377
361
 
378
- function AssignmentExpression({
379
- parent,
380
- ...props
381
- }) {
382
- const node = (0, _detachedNode.detachedProps)(parent, {
362
+ function AssignmentExpression(props) {
363
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
383
364
  type: 'AssignmentExpression',
384
- ...props
365
+ operator: props.operator,
366
+ left: (0, _detachedNode.asDetachedNode)(props.left),
367
+ right: (0, _detachedNode.asDetachedNode)(props.right)
385
368
  });
386
369
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
387
370
  return node;
388
371
  }
389
372
 
390
- function AssignmentPattern({
391
- parent,
392
- ...props
393
- }) {
394
- const node = (0, _detachedNode.detachedProps)(parent, {
373
+ function AssignmentPattern(props) {
374
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
395
375
  type: 'AssignmentPattern',
396
- ...props
376
+ left: (0, _detachedNode.asDetachedNode)(props.left),
377
+ right: (0, _detachedNode.asDetachedNode)(props.right)
397
378
  });
398
379
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
399
380
  return node;
400
381
  }
401
382
 
402
- function AwaitExpression({
403
- parent,
404
- ...props
405
- }) {
406
- const node = (0, _detachedNode.detachedProps)(parent, {
383
+ function AwaitExpression(props) {
384
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
407
385
  type: 'AwaitExpression',
408
- ...props
386
+ argument: (0, _detachedNode.asDetachedNode)(props.argument)
409
387
  });
410
388
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
411
389
  return node;
412
390
  }
413
391
 
414
- function BigIntLiteralTypeAnnotation({
415
- parent,
416
- ...props
417
- }) {
418
- const node = (0, _detachedNode.detachedProps)(parent, {
392
+ function BigIntLiteralTypeAnnotation(props) {
393
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
419
394
  type: 'BigIntLiteralTypeAnnotation',
420
- ...props
395
+ raw: props.raw
421
396
  });
422
397
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
423
398
  return node;
424
399
  }
425
400
 
426
- function BinaryExpression({
427
- parent,
428
- ...props
429
- }) {
430
- const node = (0, _detachedNode.detachedProps)(parent, {
401
+ function BinaryExpression(props) {
402
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
431
403
  type: 'BinaryExpression',
432
- ...props
404
+ left: (0, _detachedNode.asDetachedNode)(props.left),
405
+ right: (0, _detachedNode.asDetachedNode)(props.right),
406
+ operator: props.operator
433
407
  });
434
408
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
435
409
  return node;
436
410
  }
437
411
 
438
- function BlockStatement({
439
- parent,
440
- ...props
441
- }) {
442
- const node = (0, _detachedNode.detachedProps)(parent, {
412
+ function BlockStatement(props) {
413
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
443
414
  type: 'BlockStatement',
444
- ...props
415
+ body: props.body.map(n => (0, _detachedNode.asDetachedNode)(n))
445
416
  });
446
417
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
447
418
  return node;
448
419
  }
449
420
 
450
- function BooleanLiteralTypeAnnotation({
451
- parent,
452
- ...props
453
- }) {
454
- const node = (0, _detachedNode.detachedProps)(parent, {
421
+ function BooleanLiteralTypeAnnotation(props) {
422
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
455
423
  type: 'BooleanLiteralTypeAnnotation',
456
- ...props
424
+ value: props.value,
425
+ raw: props.raw
457
426
  });
458
427
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
459
428
  return node;
460
429
  }
461
430
 
462
- function BooleanTypeAnnotation({
463
- parent
464
- } = {}) {
465
- return (0, _detachedNode.detachedProps)(parent, {
431
+ function BooleanTypeAnnotation(props = { ...null
432
+ }) {
433
+ return (0, _detachedNode.detachedProps)(props.parent, {
466
434
  type: 'BooleanTypeAnnotation'
467
435
  });
468
436
  }
469
437
 
470
- function BreakStatement({
471
- parent,
472
- ...props
473
- }) {
474
- const node = (0, _detachedNode.detachedProps)(parent, {
438
+ function BreakStatement(props) {
439
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
475
440
  type: 'BreakStatement',
476
- ...props
441
+ label: (0, _detachedNode.asDetachedNode)(props.label)
477
442
  });
478
443
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
479
444
  return node;
480
445
  }
481
446
 
482
- function CallExpression({
483
- parent,
484
- ...props
485
- }) {
486
- const node = (0, _detachedNode.detachedProps)(parent, {
447
+ function CallExpression(props) {
448
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
487
449
  type: 'CallExpression',
488
- ...props
450
+ callee: (0, _detachedNode.asDetachedNode)(props.callee),
451
+ typeArguments: (0, _detachedNode.asDetachedNode)(props.typeArguments),
452
+ arguments: props.arguments.map(n => (0, _detachedNode.asDetachedNode)(n))
489
453
  });
490
454
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
491
455
  return node;
492
456
  }
493
457
 
494
- function CatchClause({
495
- parent,
496
- ...props
497
- }) {
498
- const node = (0, _detachedNode.detachedProps)(parent, {
458
+ function CatchClause(props) {
459
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
499
460
  type: 'CatchClause',
500
- ...props
461
+ param: (0, _detachedNode.asDetachedNode)(props.param),
462
+ body: (0, _detachedNode.asDetachedNode)(props.body)
501
463
  });
502
464
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
503
465
  return node;
504
466
  }
505
467
 
506
- function ClassBody({
507
- parent,
508
- ...props
509
- }) {
510
- const node = (0, _detachedNode.detachedProps)(parent, {
511
- type: 'ClassBody',
512
- ...props
468
+ function ChainExpression(props) {
469
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
470
+ type: 'ChainExpression',
471
+ expression: (0, _detachedNode.asDetachedNode)(props.expression)
513
472
  });
514
473
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
515
474
  return node;
516
475
  }
517
476
 
518
- function ClassDeclaration({
519
- parent,
520
- ...props
521
- }) {
522
- const node = (0, _detachedNode.detachedProps)(parent, {
523
- type: 'ClassDeclaration',
524
- ...props
477
+ function ClassBody(props) {
478
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
479
+ type: 'ClassBody',
480
+ body: props.body.map(n => (0, _detachedNode.asDetachedNode)(n))
525
481
  });
526
482
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
527
483
  return node;
528
484
  }
529
485
 
530
- function ClassExpression({
531
- parent,
532
- ...props
533
- }) {
534
- const node = (0, _detachedNode.detachedProps)(parent, {
486
+ function ClassExpression(props) {
487
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
535
488
  type: 'ClassExpression',
536
- ...props
489
+ id: (0, _detachedNode.asDetachedNode)(props.id),
490
+ typeParameters: (0, _detachedNode.asDetachedNode)(props.typeParameters),
491
+ superClass: (0, _detachedNode.asDetachedNode)(props.superClass),
492
+ superTypeParameters: (0, _detachedNode.asDetachedNode)(props.superTypeParameters),
493
+ implements: props.implements.map(n => (0, _detachedNode.asDetachedNode)(n)),
494
+ decorators: props.decorators.map(n => (0, _detachedNode.asDetachedNode)(n)),
495
+ body: (0, _detachedNode.asDetachedNode)(props.body)
537
496
  });
538
497
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
539
498
  return node;
540
499
  }
541
500
 
542
- function ClassImplements({
543
- parent,
544
- ...props
545
- }) {
546
- const node = (0, _detachedNode.detachedProps)(parent, {
501
+ function ClassImplements(props) {
502
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
547
503
  type: 'ClassImplements',
548
- ...props
549
- });
550
- (0, _detachedNode.setParentPointersInDirectChildren)(node);
551
- return node;
552
- }
553
-
554
- function ClassPrivateProperty({
555
- parent,
556
- ...props
557
- }) {
558
- const node = (0, _detachedNode.detachedProps)(parent, {
559
- type: 'ClassPrivateProperty',
560
- ...props
561
- });
562
- (0, _detachedNode.setParentPointersInDirectChildren)(node);
563
- return node;
564
- }
565
-
566
- function ClassProperty({
567
- parent,
568
- ...props
569
- }) {
570
- const node = (0, _detachedNode.detachedProps)(parent, {
571
- type: 'ClassProperty',
572
- ...props
504
+ id: (0, _detachedNode.asDetachedNode)(props.id),
505
+ typeParameters: (0, _detachedNode.asDetachedNode)(props.typeParameters)
573
506
  });
574
507
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
575
508
  return node;
576
509
  }
577
510
 
578
- function ConditionalExpression({
579
- parent,
580
- ...props
581
- }) {
582
- const node = (0, _detachedNode.detachedProps)(parent, {
511
+ function ConditionalExpression(props) {
512
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
583
513
  type: 'ConditionalExpression',
584
- ...props
514
+ test: (0, _detachedNode.asDetachedNode)(props.test),
515
+ alternate: (0, _detachedNode.asDetachedNode)(props.alternate),
516
+ consequent: (0, _detachedNode.asDetachedNode)(props.consequent)
585
517
  });
586
518
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
587
519
  return node;
588
520
  }
589
521
 
590
- function ContinueStatement({
591
- parent,
592
- ...props
593
- }) {
594
- const node = (0, _detachedNode.detachedProps)(parent, {
522
+ function ContinueStatement(props) {
523
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
595
524
  type: 'ContinueStatement',
596
- ...props
525
+ label: (0, _detachedNode.asDetachedNode)(props.label)
597
526
  });
598
527
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
599
528
  return node;
600
529
  }
601
530
 
602
- function DebuggerStatement({
603
- parent
604
- } = {}) {
605
- return (0, _detachedNode.detachedProps)(parent, {
531
+ function DebuggerStatement(props = { ...null
532
+ }) {
533
+ return (0, _detachedNode.detachedProps)(props.parent, {
606
534
  type: 'DebuggerStatement'
607
535
  });
608
536
  }
609
537
 
610
- function DeclareClass({
611
- parent,
612
- ...props
613
- }) {
614
- const node = (0, _detachedNode.detachedProps)(parent, {
538
+ function DeclareClass(props) {
539
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
615
540
  type: 'DeclareClass',
616
- ...props
541
+ id: (0, _detachedNode.asDetachedNode)(props.id),
542
+ typeParameters: (0, _detachedNode.asDetachedNode)(props.typeParameters),
543
+ extends: props.extends.map(n => (0, _detachedNode.asDetachedNode)(n)),
544
+ implements: props.implements.map(n => (0, _detachedNode.asDetachedNode)(n)),
545
+ mixins: props.mixins.map(n => (0, _detachedNode.asDetachedNode)(n)),
546
+ body: (0, _detachedNode.asDetachedNode)(props.body)
617
547
  });
618
548
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
619
549
  return node;
620
550
  }
621
551
 
622
- function DeclaredPredicate({
623
- parent,
624
- ...props
625
- }) {
626
- const node = (0, _detachedNode.detachedProps)(parent, {
552
+ function DeclaredPredicate(props) {
553
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
627
554
  type: 'DeclaredPredicate',
628
- ...props
555
+ value: (0, _detachedNode.asDetachedNode)(props.value)
629
556
  });
630
557
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
631
558
  return node;
632
559
  }
633
560
 
634
- function DeclareExportAllDeclaration({
635
- parent,
636
- ...props
637
- }) {
638
- const node = (0, _detachedNode.detachedProps)(parent, {
561
+ function DeclareExportAllDeclaration(props) {
562
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
639
563
  type: 'DeclareExportAllDeclaration',
640
- ...props
564
+ source: (0, _detachedNode.asDetachedNode)(props.source)
641
565
  });
642
566
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
643
567
  return node;
644
568
  }
645
569
 
646
- function DeclareExportDeclaration({
647
- parent,
648
- ...props
649
- }) {
650
- const node = (0, _detachedNode.detachedProps)(parent, {
570
+ function DeclareExportDeclaration(props) {
571
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
651
572
  type: 'DeclareExportDeclaration',
652
- ...props
573
+ declaration: (0, _detachedNode.asDetachedNode)(props.declaration),
574
+ specifiers: props.specifiers.map(n => (0, _detachedNode.asDetachedNode)(n)),
575
+ source: (0, _detachedNode.asDetachedNode)(props.source),
576
+ default: props.default
653
577
  });
654
578
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
655
579
  return node;
656
580
  }
657
581
 
658
- function DeclareFunction({
659
- parent,
660
- ...props
661
- }) {
662
- const node = (0, _detachedNode.detachedProps)(parent, {
582
+ function DeclareFunction(props) {
583
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
663
584
  type: 'DeclareFunction',
664
- ...props
585
+ id: (0, _detachedNode.asDetachedNode)(props.id),
586
+ predicate: (0, _detachedNode.asDetachedNode)(props.predicate)
665
587
  });
666
588
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
667
589
  return node;
668
590
  }
669
591
 
670
- function DeclareInterface({
671
- parent,
672
- ...props
673
- }) {
674
- const node = (0, _detachedNode.detachedProps)(parent, {
592
+ function DeclareInterface(props) {
593
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
675
594
  type: 'DeclareInterface',
676
- ...props
595
+ id: (0, _detachedNode.asDetachedNode)(props.id),
596
+ typeParameters: (0, _detachedNode.asDetachedNode)(props.typeParameters),
597
+ extends: props.extends.map(n => (0, _detachedNode.asDetachedNode)(n)),
598
+ body: (0, _detachedNode.asDetachedNode)(props.body)
677
599
  });
678
600
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
679
601
  return node;
680
602
  }
681
603
 
682
- function DeclareModule({
683
- parent,
684
- ...props
685
- }) {
686
- const node = (0, _detachedNode.detachedProps)(parent, {
604
+ function DeclareModule(props) {
605
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
687
606
  type: 'DeclareModule',
688
- ...props
607
+ id: (0, _detachedNode.asDetachedNode)(props.id),
608
+ body: (0, _detachedNode.asDetachedNode)(props.body),
609
+ kind: props.kind
689
610
  });
690
611
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
691
612
  return node;
692
613
  }
693
614
 
694
- function DeclareModuleExports({
695
- parent,
696
- ...props
697
- }) {
698
- const node = (0, _detachedNode.detachedProps)(parent, {
615
+ function DeclareModuleExports(props) {
616
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
699
617
  type: 'DeclareModuleExports',
700
- ...props
618
+ typeAnnotation: (0, _detachedNode.asDetachedNode)(props.typeAnnotation)
701
619
  });
702
620
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
703
621
  return node;
704
622
  }
705
623
 
706
- function DeclareOpaqueType({
707
- parent,
708
- ...props
709
- }) {
710
- const node = (0, _detachedNode.detachedProps)(parent, {
624
+ function DeclareOpaqueType(props) {
625
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
711
626
  type: 'DeclareOpaqueType',
712
- ...props
627
+ id: (0, _detachedNode.asDetachedNode)(props.id),
628
+ typeParameters: (0, _detachedNode.asDetachedNode)(props.typeParameters),
629
+ impltype: (0, _detachedNode.asDetachedNode)(props.impltype),
630
+ supertype: (0, _detachedNode.asDetachedNode)(props.supertype)
713
631
  });
714
632
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
715
633
  return node;
716
634
  }
717
635
 
718
- function DeclareTypeAlias({
719
- parent,
720
- ...props
721
- }) {
722
- const node = (0, _detachedNode.detachedProps)(parent, {
636
+ function DeclareTypeAlias(props) {
637
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
723
638
  type: 'DeclareTypeAlias',
724
- ...props
639
+ id: (0, _detachedNode.asDetachedNode)(props.id),
640
+ typeParameters: (0, _detachedNode.asDetachedNode)(props.typeParameters),
641
+ right: (0, _detachedNode.asDetachedNode)(props.right)
725
642
  });
726
643
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
727
644
  return node;
728
645
  }
729
646
 
730
- function DeclareVariable({
731
- parent,
732
- ...props
733
- }) {
734
- const node = (0, _detachedNode.detachedProps)(parent, {
647
+ function DeclareVariable(props) {
648
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
735
649
  type: 'DeclareVariable',
736
- ...props
650
+ id: (0, _detachedNode.asDetachedNode)(props.id)
737
651
  });
738
652
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
739
653
  return node;
740
654
  }
741
655
 
742
- function DoWhileStatement({
743
- parent,
744
- ...props
745
- }) {
746
- const node = (0, _detachedNode.detachedProps)(parent, {
656
+ function DoWhileStatement(props) {
657
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
747
658
  type: 'DoWhileStatement',
748
- ...props
659
+ body: (0, _detachedNode.asDetachedNode)(props.body),
660
+ test: (0, _detachedNode.asDetachedNode)(props.test)
749
661
  });
750
662
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
751
663
  return node;
752
664
  }
753
665
 
754
- function EmptyStatement({
755
- parent
756
- } = {}) {
757
- return (0, _detachedNode.detachedProps)(parent, {
666
+ function EmptyStatement(props = { ...null
667
+ }) {
668
+ return (0, _detachedNode.detachedProps)(props.parent, {
758
669
  type: 'EmptyStatement'
759
670
  });
760
671
  }
761
672
 
762
- function EmptyTypeAnnotation({
763
- parent
764
- } = {}) {
765
- return (0, _detachedNode.detachedProps)(parent, {
673
+ function EmptyTypeAnnotation(props = { ...null
674
+ }) {
675
+ return (0, _detachedNode.detachedProps)(props.parent, {
766
676
  type: 'EmptyTypeAnnotation'
767
677
  });
768
678
  }
769
679
 
770
- function EnumBooleanBody({
771
- parent,
772
- ...props
773
- }) {
774
- const node = (0, _detachedNode.detachedProps)(parent, {
680
+ function EnumBooleanBody(props) {
681
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
775
682
  type: 'EnumBooleanBody',
776
- ...props
683
+ members: props.members.map(n => (0, _detachedNode.asDetachedNode)(n)),
684
+ explicitType: props.explicitType,
685
+ hasUnknownMembers: props.hasUnknownMembers
777
686
  });
778
687
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
779
688
  return node;
780
689
  }
781
690
 
782
- function EnumBooleanMember({
783
- parent,
784
- ...props
785
- }) {
786
- const node = (0, _detachedNode.detachedProps)(parent, {
691
+ function EnumBooleanMember(props) {
692
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
787
693
  type: 'EnumBooleanMember',
788
- ...props
694
+ id: (0, _detachedNode.asDetachedNode)(props.id),
695
+ init: (0, _detachedNode.asDetachedNode)(props.init)
789
696
  });
790
697
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
791
698
  return node;
792
699
  }
793
700
 
794
- function EnumDeclaration({
795
- parent,
796
- ...props
797
- }) {
798
- const node = (0, _detachedNode.detachedProps)(parent, {
701
+ function EnumDeclaration(props) {
702
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
799
703
  type: 'EnumDeclaration',
800
- ...props
704
+ id: (0, _detachedNode.asDetachedNode)(props.id),
705
+ body: (0, _detachedNode.asDetachedNode)(props.body)
801
706
  });
802
707
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
803
708
  return node;
804
709
  }
805
710
 
806
- function EnumDefaultedMember({
807
- parent,
808
- ...props
809
- }) {
810
- const node = (0, _detachedNode.detachedProps)(parent, {
711
+ function EnumDefaultedMember(props) {
712
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
811
713
  type: 'EnumDefaultedMember',
812
- ...props
714
+ id: (0, _detachedNode.asDetachedNode)(props.id)
813
715
  });
814
716
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
815
717
  return node;
816
718
  }
817
719
 
818
- function EnumNumberBody({
819
- parent,
820
- ...props
821
- }) {
822
- const node = (0, _detachedNode.detachedProps)(parent, {
720
+ function EnumNumberBody(props) {
721
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
823
722
  type: 'EnumNumberBody',
824
- ...props
723
+ members: props.members.map(n => (0, _detachedNode.asDetachedNode)(n)),
724
+ explicitType: props.explicitType,
725
+ hasUnknownMembers: props.hasUnknownMembers
825
726
  });
826
727
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
827
728
  return node;
828
729
  }
829
730
 
830
- function EnumNumberMember({
831
- parent,
832
- ...props
833
- }) {
834
- const node = (0, _detachedNode.detachedProps)(parent, {
731
+ function EnumNumberMember(props) {
732
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
835
733
  type: 'EnumNumberMember',
836
- ...props
734
+ id: (0, _detachedNode.asDetachedNode)(props.id),
735
+ init: (0, _detachedNode.asDetachedNode)(props.init)
837
736
  });
838
737
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
839
738
  return node;
840
739
  }
841
740
 
842
- function EnumStringBody({
843
- parent,
844
- ...props
845
- }) {
846
- const node = (0, _detachedNode.detachedProps)(parent, {
741
+ function EnumStringBody(props) {
742
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
847
743
  type: 'EnumStringBody',
848
- ...props
744
+ members: props.members.map(n => (0, _detachedNode.asDetachedNode)(n)),
745
+ explicitType: props.explicitType,
746
+ hasUnknownMembers: props.hasUnknownMembers
849
747
  });
850
748
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
851
749
  return node;
852
750
  }
853
751
 
854
- function EnumStringMember({
855
- parent,
856
- ...props
857
- }) {
858
- const node = (0, _detachedNode.detachedProps)(parent, {
752
+ function EnumStringMember(props) {
753
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
859
754
  type: 'EnumStringMember',
860
- ...props
755
+ id: (0, _detachedNode.asDetachedNode)(props.id),
756
+ init: (0, _detachedNode.asDetachedNode)(props.init)
861
757
  });
862
758
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
863
759
  return node;
864
760
  }
865
761
 
866
- function EnumSymbolBody({
867
- parent,
868
- ...props
869
- }) {
870
- const node = (0, _detachedNode.detachedProps)(parent, {
762
+ function EnumSymbolBody(props) {
763
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
871
764
  type: 'EnumSymbolBody',
872
- ...props
765
+ members: props.members.map(n => (0, _detachedNode.asDetachedNode)(n)),
766
+ hasUnknownMembers: props.hasUnknownMembers
873
767
  });
874
768
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
875
769
  return node;
876
770
  }
877
771
 
878
- function ExistsTypeAnnotation({
879
- parent
880
- } = {}) {
881
- return (0, _detachedNode.detachedProps)(parent, {
772
+ function ExistsTypeAnnotation(props = { ...null
773
+ }) {
774
+ return (0, _detachedNode.detachedProps)(props.parent, {
882
775
  type: 'ExistsTypeAnnotation'
883
776
  });
884
777
  }
885
778
 
886
- function ExportAllDeclaration({
887
- parent,
888
- ...props
889
- }) {
890
- const node = (0, _detachedNode.detachedProps)(parent, {
779
+ function ExportAllDeclaration(props) {
780
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
891
781
  type: 'ExportAllDeclaration',
892
- ...props
782
+ exported: (0, _detachedNode.asDetachedNode)(props.exported),
783
+ source: (0, _detachedNode.asDetachedNode)(props.source),
784
+ exportKind: props.exportKind
893
785
  });
894
786
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
895
787
  return node;
896
788
  }
897
789
 
898
- function ExportDefaultDeclaration({
899
- parent,
900
- ...props
901
- }) {
902
- const node = (0, _detachedNode.detachedProps)(parent, {
790
+ function ExportDefaultDeclaration(props) {
791
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
903
792
  type: 'ExportDefaultDeclaration',
904
- ...props
793
+ declaration: (0, _detachedNode.asDetachedNode)(props.declaration)
905
794
  });
906
795
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
907
796
  return node;
908
797
  }
909
798
 
910
- function ExportNamedDeclaration({
911
- parent,
912
- ...props
913
- }) {
914
- const node = (0, _detachedNode.detachedProps)(parent, {
799
+ function ExportNamedDeclaration(props) {
800
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
915
801
  type: 'ExportNamedDeclaration',
916
- ...props
917
- });
918
- (0, _detachedNode.setParentPointersInDirectChildren)(node);
919
- return node;
920
- }
921
-
922
- function ExportNamespaceSpecifier({
923
- parent,
924
- ...props
925
- }) {
926
- const node = (0, _detachedNode.detachedProps)(parent, {
927
- type: 'ExportNamespaceSpecifier',
928
- ...props
802
+ declaration: (0, _detachedNode.asDetachedNode)(props.declaration),
803
+ specifiers: props.specifiers.map(n => (0, _detachedNode.asDetachedNode)(n)),
804
+ source: (0, _detachedNode.asDetachedNode)(props.source),
805
+ exportKind: props.exportKind
929
806
  });
930
807
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
931
808
  return node;
932
809
  }
933
810
 
934
- function ExportSpecifier({
935
- parent,
936
- ...props
937
- }) {
938
- const node = (0, _detachedNode.detachedProps)(parent, {
811
+ function ExportSpecifier(props) {
812
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
939
813
  type: 'ExportSpecifier',
940
- ...props
814
+ exported: (0, _detachedNode.asDetachedNode)(props.exported),
815
+ local: (0, _detachedNode.asDetachedNode)(props.local)
941
816
  });
942
817
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
943
818
  return node;
944
819
  }
945
820
 
946
- function ExpressionStatement({
947
- parent,
948
- ...props
949
- }) {
950
- const node = (0, _detachedNode.detachedProps)(parent, {
821
+ function ExpressionStatement(props) {
822
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
951
823
  type: 'ExpressionStatement',
952
- ...props
824
+ expression: (0, _detachedNode.asDetachedNode)(props.expression),
825
+ directive: props.directive
953
826
  });
954
827
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
955
828
  return node;
956
829
  }
957
830
 
958
- function ForInStatement({
959
- parent,
960
- ...props
961
- }) {
962
- const node = (0, _detachedNode.detachedProps)(parent, {
831
+ function ForInStatement(props) {
832
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
963
833
  type: 'ForInStatement',
964
- ...props
834
+ left: (0, _detachedNode.asDetachedNode)(props.left),
835
+ right: (0, _detachedNode.asDetachedNode)(props.right),
836
+ body: (0, _detachedNode.asDetachedNode)(props.body)
965
837
  });
966
838
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
967
839
  return node;
968
840
  }
969
841
 
970
- function ForOfStatement({
971
- parent,
972
- ...props
973
- }) {
974
- const node = (0, _detachedNode.detachedProps)(parent, {
842
+ function ForOfStatement(props) {
843
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
975
844
  type: 'ForOfStatement',
976
- ...props
845
+ left: (0, _detachedNode.asDetachedNode)(props.left),
846
+ right: (0, _detachedNode.asDetachedNode)(props.right),
847
+ body: (0, _detachedNode.asDetachedNode)(props.body),
848
+ await: props.await
977
849
  });
978
850
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
979
851
  return node;
980
852
  }
981
853
 
982
- function ForStatement({
983
- parent,
984
- ...props
985
- }) {
986
- const node = (0, _detachedNode.detachedProps)(parent, {
854
+ function ForStatement(props) {
855
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
987
856
  type: 'ForStatement',
988
- ...props
857
+ init: (0, _detachedNode.asDetachedNode)(props.init),
858
+ test: (0, _detachedNode.asDetachedNode)(props.test),
859
+ update: (0, _detachedNode.asDetachedNode)(props.update),
860
+ body: (0, _detachedNode.asDetachedNode)(props.body)
989
861
  });
990
862
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
991
863
  return node;
992
864
  }
993
865
 
994
- function FunctionDeclaration({
995
- parent,
996
- ...props
997
- }) {
998
- const node = (0, _detachedNode.detachedProps)(parent, {
866
+ function FunctionDeclaration(props) {
867
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
999
868
  type: 'FunctionDeclaration',
1000
- ...props
869
+ id: (0, _detachedNode.asDetachedNode)(props.id),
870
+ params: props.params.map(n => (0, _detachedNode.asDetachedNode)(n)),
871
+ body: (0, _detachedNode.asDetachedNode)(props.body),
872
+ typeParameters: (0, _detachedNode.asDetachedNode)(props.typeParameters),
873
+ returnType: (0, _detachedNode.asDetachedNode)(props.returnType),
874
+ predicate: (0, _detachedNode.asDetachedNode)(props.predicate),
875
+ generator: props.generator,
876
+ async: props.async
1001
877
  });
1002
878
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1003
879
  return node;
1004
880
  }
1005
881
 
1006
- function FunctionExpression({
1007
- parent,
1008
- ...props
1009
- }) {
1010
- const node = (0, _detachedNode.detachedProps)(parent, {
882
+ function FunctionExpression(props) {
883
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1011
884
  type: 'FunctionExpression',
1012
- ...props
885
+ id: (0, _detachedNode.asDetachedNode)(props.id),
886
+ params: props.params.map(n => (0, _detachedNode.asDetachedNode)(n)),
887
+ body: (0, _detachedNode.asDetachedNode)(props.body),
888
+ typeParameters: (0, _detachedNode.asDetachedNode)(props.typeParameters),
889
+ returnType: (0, _detachedNode.asDetachedNode)(props.returnType),
890
+ predicate: (0, _detachedNode.asDetachedNode)(props.predicate),
891
+ generator: props.generator,
892
+ async: props.async
1013
893
  });
1014
894
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1015
895
  return node;
1016
896
  }
1017
897
 
1018
- function FunctionTypeAnnotation({
1019
- parent,
1020
- ...props
1021
- }) {
1022
- const node = (0, _detachedNode.detachedProps)(parent, {
898
+ function FunctionTypeAnnotation(props) {
899
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1023
900
  type: 'FunctionTypeAnnotation',
1024
- ...props
901
+ params: props.params.map(n => (0, _detachedNode.asDetachedNode)(n)),
902
+ this: (0, _detachedNode.asDetachedNode)(props.this),
903
+ returnType: (0, _detachedNode.asDetachedNode)(props.returnType),
904
+ rest: (0, _detachedNode.asDetachedNode)(props.rest),
905
+ typeParameters: (0, _detachedNode.asDetachedNode)(props.typeParameters)
1025
906
  });
1026
907
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1027
908
  return node;
1028
909
  }
1029
910
 
1030
- function FunctionTypeParam({
1031
- parent,
1032
- ...props
1033
- }) {
1034
- const node = (0, _detachedNode.detachedProps)(parent, {
911
+ function FunctionTypeParam(props) {
912
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1035
913
  type: 'FunctionTypeParam',
1036
- ...props
914
+ name: (0, _detachedNode.asDetachedNode)(props.name),
915
+ typeAnnotation: (0, _detachedNode.asDetachedNode)(props.typeAnnotation),
916
+ optional: props.optional
1037
917
  });
1038
918
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1039
919
  return node;
1040
920
  }
1041
921
 
1042
- function GenericTypeAnnotation({
1043
- parent,
1044
- ...props
1045
- }) {
1046
- const node = (0, _detachedNode.detachedProps)(parent, {
922
+ function GenericTypeAnnotation(props) {
923
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1047
924
  type: 'GenericTypeAnnotation',
1048
- ...props
925
+ id: (0, _detachedNode.asDetachedNode)(props.id),
926
+ typeParameters: (0, _detachedNode.asDetachedNode)(props.typeParameters)
1049
927
  });
1050
928
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1051
929
  return node;
1052
930
  }
1053
931
 
1054
- function IfStatement({
1055
- parent,
1056
- ...props
1057
- }) {
1058
- const node = (0, _detachedNode.detachedProps)(parent, {
932
+ function IfStatement(props) {
933
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1059
934
  type: 'IfStatement',
1060
- ...props
935
+ test: (0, _detachedNode.asDetachedNode)(props.test),
936
+ consequent: (0, _detachedNode.asDetachedNode)(props.consequent),
937
+ alternate: (0, _detachedNode.asDetachedNode)(props.alternate)
1061
938
  });
1062
939
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1063
940
  return node;
1064
941
  }
1065
942
 
1066
- function ImportAttribute({
1067
- parent,
1068
- ...props
1069
- }) {
1070
- const node = (0, _detachedNode.detachedProps)(parent, {
943
+ function ImportAttribute(props) {
944
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1071
945
  type: 'ImportAttribute',
1072
- ...props
946
+ key: (0, _detachedNode.asDetachedNode)(props.key),
947
+ value: (0, _detachedNode.asDetachedNode)(props.value)
1073
948
  });
1074
949
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1075
950
  return node;
1076
951
  }
1077
952
 
1078
- function ImportDeclaration({
1079
- parent,
1080
- ...props
1081
- }) {
1082
- const node = (0, _detachedNode.detachedProps)(parent, {
953
+ function ImportDeclaration(props) {
954
+ var _props$assertions;
955
+
956
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1083
957
  type: 'ImportDeclaration',
1084
- ...props
958
+ specifiers: props.specifiers.map(n => (0, _detachedNode.asDetachedNode)(n)),
959
+ source: (0, _detachedNode.asDetachedNode)(props.source),
960
+ assertions: (_props$assertions = props.assertions) == null ? void 0 : _props$assertions.map(n => (0, _detachedNode.asDetachedNode)(n)),
961
+ importKind: props.importKind
1085
962
  });
1086
963
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1087
964
  return node;
1088
965
  }
1089
966
 
1090
- function ImportDefaultSpecifier({
1091
- parent,
1092
- ...props
1093
- }) {
1094
- const node = (0, _detachedNode.detachedProps)(parent, {
967
+ function ImportDefaultSpecifier(props) {
968
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1095
969
  type: 'ImportDefaultSpecifier',
1096
- ...props
970
+ local: (0, _detachedNode.asDetachedNode)(props.local)
1097
971
  });
1098
972
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1099
973
  return node;
1100
974
  }
1101
975
 
1102
- function ImportExpression({
1103
- parent,
1104
- ...props
1105
- }) {
1106
- const node = (0, _detachedNode.detachedProps)(parent, {
976
+ function ImportExpression(props) {
977
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1107
978
  type: 'ImportExpression',
1108
- ...props
979
+ source: (0, _detachedNode.asDetachedNode)(props.source),
980
+ attributes: (0, _detachedNode.asDetachedNode)(props.attributes)
1109
981
  });
1110
982
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1111
983
  return node;
1112
984
  }
1113
985
 
1114
- function ImportNamespaceSpecifier({
1115
- parent,
1116
- ...props
1117
- }) {
1118
- const node = (0, _detachedNode.detachedProps)(parent, {
986
+ function ImportNamespaceSpecifier(props) {
987
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1119
988
  type: 'ImportNamespaceSpecifier',
1120
- ...props
989
+ local: (0, _detachedNode.asDetachedNode)(props.local)
1121
990
  });
1122
991
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1123
992
  return node;
1124
993
  }
1125
994
 
1126
- function ImportSpecifier({
1127
- parent,
1128
- ...props
1129
- }) {
1130
- const node = (0, _detachedNode.detachedProps)(parent, {
995
+ function ImportSpecifier(props) {
996
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1131
997
  type: 'ImportSpecifier',
1132
- ...props
998
+ imported: (0, _detachedNode.asDetachedNode)(props.imported),
999
+ local: (0, _detachedNode.asDetachedNode)(props.local),
1000
+ importKind: props.importKind
1133
1001
  });
1134
1002
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1135
1003
  return node;
1136
1004
  }
1137
1005
 
1138
- function IndexedAccessType({
1139
- parent,
1140
- ...props
1141
- }) {
1142
- const node = (0, _detachedNode.detachedProps)(parent, {
1006
+ function IndexedAccessType(props) {
1007
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1143
1008
  type: 'IndexedAccessType',
1144
- ...props
1009
+ objectType: (0, _detachedNode.asDetachedNode)(props.objectType),
1010
+ indexType: (0, _detachedNode.asDetachedNode)(props.indexType)
1145
1011
  });
1146
1012
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1147
1013
  return node;
1148
1014
  }
1149
1015
 
1150
- function InferredPredicate({
1151
- parent
1152
- } = {}) {
1153
- return (0, _detachedNode.detachedProps)(parent, {
1016
+ function InferredPredicate(props = { ...null
1017
+ }) {
1018
+ return (0, _detachedNode.detachedProps)(props.parent, {
1154
1019
  type: 'InferredPredicate'
1155
1020
  });
1156
1021
  }
1157
1022
 
1158
- function InterfaceDeclaration({
1159
- parent,
1160
- ...props
1161
- }) {
1162
- const node = (0, _detachedNode.detachedProps)(parent, {
1023
+ function InterfaceDeclaration(props) {
1024
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1163
1025
  type: 'InterfaceDeclaration',
1164
- ...props
1026
+ id: (0, _detachedNode.asDetachedNode)(props.id),
1027
+ typeParameters: (0, _detachedNode.asDetachedNode)(props.typeParameters),
1028
+ extends: props.extends.map(n => (0, _detachedNode.asDetachedNode)(n)),
1029
+ body: (0, _detachedNode.asDetachedNode)(props.body)
1165
1030
  });
1166
1031
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1167
1032
  return node;
1168
1033
  }
1169
1034
 
1170
- function InterfaceExtends({
1171
- parent,
1172
- ...props
1173
- }) {
1174
- const node = (0, _detachedNode.detachedProps)(parent, {
1035
+ function InterfaceExtends(props) {
1036
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1175
1037
  type: 'InterfaceExtends',
1176
- ...props
1038
+ id: (0, _detachedNode.asDetachedNode)(props.id),
1039
+ typeParameters: (0, _detachedNode.asDetachedNode)(props.typeParameters)
1177
1040
  });
1178
1041
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1179
1042
  return node;
1180
1043
  }
1181
1044
 
1182
- function InterfaceTypeAnnotation({
1183
- parent,
1184
- ...props
1185
- }) {
1186
- const node = (0, _detachedNode.detachedProps)(parent, {
1045
+ function InterfaceTypeAnnotation(props) {
1046
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1187
1047
  type: 'InterfaceTypeAnnotation',
1188
- ...props
1048
+ extends: props.extends.map(n => (0, _detachedNode.asDetachedNode)(n)),
1049
+ body: (0, _detachedNode.asDetachedNode)(props.body)
1189
1050
  });
1190
1051
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1191
1052
  return node;
1192
1053
  }
1193
1054
 
1194
- function IntersectionTypeAnnotation({
1195
- parent,
1196
- ...props
1197
- }) {
1198
- const node = (0, _detachedNode.detachedProps)(parent, {
1055
+ function IntersectionTypeAnnotation(props) {
1056
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1199
1057
  type: 'IntersectionTypeAnnotation',
1200
- ...props
1058
+ types: props.types.map(n => (0, _detachedNode.asDetachedNode)(n))
1201
1059
  });
1202
1060
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1203
1061
  return node;
1204
1062
  }
1205
1063
 
1206
- function JSXAttribute({
1207
- parent,
1208
- ...props
1209
- }) {
1210
- const node = (0, _detachedNode.detachedProps)(parent, {
1064
+ function JSXAttribute(props) {
1065
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1211
1066
  type: 'JSXAttribute',
1212
- ...props
1067
+ name: (0, _detachedNode.asDetachedNode)(props.name),
1068
+ value: (0, _detachedNode.asDetachedNode)(props.value)
1213
1069
  });
1214
1070
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1215
1071
  return node;
1216
1072
  }
1217
1073
 
1218
- function JSXClosingElement({
1219
- parent,
1220
- ...props
1221
- }) {
1222
- const node = (0, _detachedNode.detachedProps)(parent, {
1074
+ function JSXClosingElement(props) {
1075
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1223
1076
  type: 'JSXClosingElement',
1224
- ...props
1077
+ name: (0, _detachedNode.asDetachedNode)(props.name)
1225
1078
  });
1226
1079
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1227
1080
  return node;
1228
1081
  }
1229
1082
 
1230
- function JSXClosingFragment({
1231
- parent
1232
- } = {}) {
1233
- return (0, _detachedNode.detachedProps)(parent, {
1083
+ function JSXClosingFragment(props = { ...null
1084
+ }) {
1085
+ return (0, _detachedNode.detachedProps)(props.parent, {
1234
1086
  type: 'JSXClosingFragment'
1235
1087
  });
1236
1088
  }
1237
1089
 
1238
- function JSXElement({
1239
- parent,
1240
- ...props
1241
- }) {
1242
- const node = (0, _detachedNode.detachedProps)(parent, {
1090
+ function JSXElement(props) {
1091
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1243
1092
  type: 'JSXElement',
1244
- ...props
1093
+ openingElement: (0, _detachedNode.asDetachedNode)(props.openingElement),
1094
+ children: props.children.map(n => (0, _detachedNode.asDetachedNode)(n)),
1095
+ closingElement: (0, _detachedNode.asDetachedNode)(props.closingElement)
1245
1096
  });
1246
1097
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1247
1098
  return node;
1248
1099
  }
1249
1100
 
1250
- function JSXEmptyExpression({
1251
- parent
1252
- } = {}) {
1253
- return (0, _detachedNode.detachedProps)(parent, {
1101
+ function JSXEmptyExpression(props = { ...null
1102
+ }) {
1103
+ return (0, _detachedNode.detachedProps)(props.parent, {
1254
1104
  type: 'JSXEmptyExpression'
1255
1105
  });
1256
1106
  }
1257
1107
 
1258
- function JSXExpressionContainer({
1259
- parent,
1260
- ...props
1261
- }) {
1262
- const node = (0, _detachedNode.detachedProps)(parent, {
1108
+ function JSXExpressionContainer(props) {
1109
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1263
1110
  type: 'JSXExpressionContainer',
1264
- ...props
1111
+ expression: (0, _detachedNode.asDetachedNode)(props.expression)
1265
1112
  });
1266
1113
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1267
1114
  return node;
1268
1115
  }
1269
1116
 
1270
- function JSXFragment({
1271
- parent,
1272
- ...props
1273
- }) {
1274
- const node = (0, _detachedNode.detachedProps)(parent, {
1117
+ function JSXFragment(props) {
1118
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1275
1119
  type: 'JSXFragment',
1276
- ...props
1120
+ openingFragment: (0, _detachedNode.asDetachedNode)(props.openingFragment),
1121
+ children: props.children.map(n => (0, _detachedNode.asDetachedNode)(n)),
1122
+ closingFragment: (0, _detachedNode.asDetachedNode)(props.closingFragment)
1277
1123
  });
1278
1124
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1279
1125
  return node;
1280
1126
  }
1281
1127
 
1282
- function JSXIdentifier({
1283
- parent,
1284
- ...props
1285
- }) {
1286
- const node = (0, _detachedNode.detachedProps)(parent, {
1128
+ function JSXIdentifier(props) {
1129
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1287
1130
  type: 'JSXIdentifier',
1288
- ...props
1131
+ name: props.name
1289
1132
  });
1290
1133
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1291
1134
  return node;
1292
1135
  }
1293
1136
 
1294
- function JSXMemberExpression({
1295
- parent,
1296
- ...props
1297
- }) {
1298
- const node = (0, _detachedNode.detachedProps)(parent, {
1137
+ function JSXMemberExpression(props) {
1138
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1299
1139
  type: 'JSXMemberExpression',
1300
- ...props
1140
+ object: (0, _detachedNode.asDetachedNode)(props.object),
1141
+ property: (0, _detachedNode.asDetachedNode)(props.property)
1301
1142
  });
1302
1143
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1303
1144
  return node;
1304
1145
  }
1305
1146
 
1306
- function JSXNamespacedName({
1307
- parent,
1308
- ...props
1309
- }) {
1310
- const node = (0, _detachedNode.detachedProps)(parent, {
1147
+ function JSXNamespacedName(props) {
1148
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1311
1149
  type: 'JSXNamespacedName',
1312
- ...props
1150
+ namespace: (0, _detachedNode.asDetachedNode)(props.namespace),
1151
+ name: (0, _detachedNode.asDetachedNode)(props.name)
1313
1152
  });
1314
1153
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1315
1154
  return node;
1316
1155
  }
1317
1156
 
1318
- function JSXOpeningElement({
1319
- parent,
1320
- ...props
1321
- }) {
1322
- const node = (0, _detachedNode.detachedProps)(parent, {
1157
+ function JSXOpeningElement(props) {
1158
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1323
1159
  type: 'JSXOpeningElement',
1324
- ...props
1160
+ name: (0, _detachedNode.asDetachedNode)(props.name),
1161
+ attributes: props.attributes.map(n => (0, _detachedNode.asDetachedNode)(n)),
1162
+ selfClosing: props.selfClosing
1325
1163
  });
1326
1164
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1327
1165
  return node;
1328
1166
  }
1329
1167
 
1330
- function JSXOpeningFragment({
1331
- parent
1332
- } = {}) {
1333
- return (0, _detachedNode.detachedProps)(parent, {
1168
+ function JSXOpeningFragment(props = { ...null
1169
+ }) {
1170
+ return (0, _detachedNode.detachedProps)(props.parent, {
1334
1171
  type: 'JSXOpeningFragment'
1335
1172
  });
1336
1173
  }
1337
1174
 
1338
- function JSXSpreadAttribute({
1339
- parent,
1340
- ...props
1341
- }) {
1342
- const node = (0, _detachedNode.detachedProps)(parent, {
1175
+ function JSXSpreadAttribute(props) {
1176
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1343
1177
  type: 'JSXSpreadAttribute',
1344
- ...props
1178
+ argument: (0, _detachedNode.asDetachedNode)(props.argument)
1345
1179
  });
1346
1180
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1347
1181
  return node;
1348
1182
  }
1349
1183
 
1350
- function JSXSpreadChild({
1351
- parent,
1352
- ...props
1353
- }) {
1354
- const node = (0, _detachedNode.detachedProps)(parent, {
1184
+ function JSXSpreadChild(props) {
1185
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1355
1186
  type: 'JSXSpreadChild',
1356
- ...props
1187
+ expression: (0, _detachedNode.asDetachedNode)(props.expression)
1357
1188
  });
1358
1189
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1359
1190
  return node;
1360
1191
  }
1361
1192
 
1362
- function JSXText({
1363
- parent,
1364
- ...props
1365
- }) {
1366
- const node = (0, _detachedNode.detachedProps)(parent, {
1193
+ function JSXText(props) {
1194
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1367
1195
  type: 'JSXText',
1368
- ...props
1196
+ value: props.value,
1197
+ raw: props.raw
1369
1198
  });
1370
1199
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1371
1200
  return node;
1372
1201
  }
1373
1202
 
1374
- function LabeledStatement({
1375
- parent,
1376
- ...props
1377
- }) {
1378
- const node = (0, _detachedNode.detachedProps)(parent, {
1203
+ function LabeledStatement(props) {
1204
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1379
1205
  type: 'LabeledStatement',
1380
- ...props
1206
+ label: (0, _detachedNode.asDetachedNode)(props.label),
1207
+ body: (0, _detachedNode.asDetachedNode)(props.body)
1381
1208
  });
1382
1209
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1383
1210
  return node;
1384
1211
  }
1385
1212
 
1386
- function LogicalExpression({
1387
- parent,
1388
- ...props
1389
- }) {
1390
- const node = (0, _detachedNode.detachedProps)(parent, {
1213
+ function LogicalExpression(props) {
1214
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1391
1215
  type: 'LogicalExpression',
1392
- ...props
1216
+ left: (0, _detachedNode.asDetachedNode)(props.left),
1217
+ right: (0, _detachedNode.asDetachedNode)(props.right),
1218
+ operator: props.operator
1393
1219
  });
1394
1220
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1395
1221
  return node;
1396
1222
  }
1397
1223
 
1398
- function MemberExpression({
1399
- parent,
1400
- ...props
1401
- }) {
1402
- const node = (0, _detachedNode.detachedProps)(parent, {
1224
+ function MemberExpression(props) {
1225
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1403
1226
  type: 'MemberExpression',
1404
- ...props
1227
+ object: (0, _detachedNode.asDetachedNode)(props.object),
1228
+ property: (0, _detachedNode.asDetachedNode)(props.property),
1229
+ computed: props.computed
1405
1230
  });
1406
1231
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1407
1232
  return node;
1408
1233
  }
1409
1234
 
1410
- function MetaProperty({
1411
- parent,
1412
- ...props
1413
- }) {
1414
- const node = (0, _detachedNode.detachedProps)(parent, {
1235
+ function MetaProperty(props) {
1236
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1415
1237
  type: 'MetaProperty',
1416
- ...props
1238
+ meta: (0, _detachedNode.asDetachedNode)(props.meta),
1239
+ property: (0, _detachedNode.asDetachedNode)(props.property)
1417
1240
  });
1418
1241
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1419
1242
  return node;
1420
1243
  }
1421
1244
 
1422
- function MethodDefinition({
1423
- parent,
1424
- ...props
1425
- }) {
1426
- const node = (0, _detachedNode.detachedProps)(parent, {
1245
+ function MethodDefinition(props) {
1246
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1427
1247
  type: 'MethodDefinition',
1428
- ...props
1248
+ key: (0, _detachedNode.asDetachedNode)(props.key),
1249
+ value: (0, _detachedNode.asDetachedNode)(props.value),
1250
+ kind: props.kind,
1251
+ computed: props.computed,
1252
+ static: props.static
1429
1253
  });
1430
1254
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1431
1255
  return node;
1432
1256
  }
1433
1257
 
1434
- function MixedTypeAnnotation({
1435
- parent
1436
- } = {}) {
1437
- return (0, _detachedNode.detachedProps)(parent, {
1258
+ function MixedTypeAnnotation(props = { ...null
1259
+ }) {
1260
+ return (0, _detachedNode.detachedProps)(props.parent, {
1438
1261
  type: 'MixedTypeAnnotation'
1439
1262
  });
1440
1263
  }
1441
1264
 
1442
- function NewExpression({
1443
- parent,
1444
- ...props
1445
- }) {
1446
- const node = (0, _detachedNode.detachedProps)(parent, {
1265
+ function NewExpression(props) {
1266
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1447
1267
  type: 'NewExpression',
1448
- ...props
1268
+ callee: (0, _detachedNode.asDetachedNode)(props.callee),
1269
+ typeArguments: (0, _detachedNode.asDetachedNode)(props.typeArguments),
1270
+ arguments: props.arguments.map(n => (0, _detachedNode.asDetachedNode)(n))
1449
1271
  });
1450
1272
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1451
1273
  return node;
1452
1274
  }
1453
1275
 
1454
- function NullableTypeAnnotation({
1455
- parent,
1456
- ...props
1457
- }) {
1458
- const node = (0, _detachedNode.detachedProps)(parent, {
1276
+ function NullableTypeAnnotation(props) {
1277
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1459
1278
  type: 'NullableTypeAnnotation',
1460
- ...props
1279
+ typeAnnotation: (0, _detachedNode.asDetachedNode)(props.typeAnnotation)
1461
1280
  });
1462
1281
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1463
1282
  return node;
1464
1283
  }
1465
1284
 
1466
- function NullLiteralTypeAnnotation({
1467
- parent
1468
- } = {}) {
1469
- return (0, _detachedNode.detachedProps)(parent, {
1285
+ function NullLiteralTypeAnnotation(props = { ...null
1286
+ }) {
1287
+ return (0, _detachedNode.detachedProps)(props.parent, {
1470
1288
  type: 'NullLiteralTypeAnnotation'
1471
1289
  });
1472
1290
  }
1473
1291
 
1474
- function NumberLiteralTypeAnnotation({
1475
- parent,
1476
- ...props
1477
- }) {
1478
- const node = (0, _detachedNode.detachedProps)(parent, {
1292
+ function NumberLiteralTypeAnnotation(props) {
1293
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1479
1294
  type: 'NumberLiteralTypeAnnotation',
1480
- ...props
1295
+ value: props.value,
1296
+ raw: props.raw
1481
1297
  });
1482
1298
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1483
1299
  return node;
1484
1300
  }
1485
1301
 
1486
- function NumberTypeAnnotation({
1487
- parent
1488
- } = {}) {
1489
- return (0, _detachedNode.detachedProps)(parent, {
1302
+ function NumberTypeAnnotation(props = { ...null
1303
+ }) {
1304
+ return (0, _detachedNode.detachedProps)(props.parent, {
1490
1305
  type: 'NumberTypeAnnotation'
1491
1306
  });
1492
1307
  }
1493
1308
 
1494
- function ObjectExpression({
1495
- parent,
1496
- ...props
1497
- }) {
1498
- const node = (0, _detachedNode.detachedProps)(parent, {
1309
+ function ObjectExpression(props) {
1310
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1499
1311
  type: 'ObjectExpression',
1500
- ...props
1312
+ properties: props.properties.map(n => (0, _detachedNode.asDetachedNode)(n))
1501
1313
  });
1502
1314
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1503
1315
  return node;
1504
1316
  }
1505
1317
 
1506
- function ObjectPattern({
1507
- parent,
1508
- ...props
1509
- }) {
1510
- const node = (0, _detachedNode.detachedProps)(parent, {
1318
+ function ObjectPattern(props) {
1319
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1511
1320
  type: 'ObjectPattern',
1512
- ...props
1321
+ properties: props.properties.map(n => (0, _detachedNode.asDetachedNode)(n)),
1322
+ typeAnnotation: (0, _detachedNode.asDetachedNode)(props.typeAnnotation)
1513
1323
  });
1514
1324
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1515
1325
  return node;
1516
1326
  }
1517
1327
 
1518
- function ObjectTypeAnnotation({
1519
- parent,
1520
- ...props
1521
- }) {
1522
- const node = (0, _detachedNode.detachedProps)(parent, {
1328
+ function ObjectTypeAnnotation(props) {
1329
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1523
1330
  type: 'ObjectTypeAnnotation',
1524
- ...props
1331
+ properties: props.properties.map(n => (0, _detachedNode.asDetachedNode)(n)),
1332
+ indexers: props.indexers.map(n => (0, _detachedNode.asDetachedNode)(n)),
1333
+ callProperties: props.callProperties.map(n => (0, _detachedNode.asDetachedNode)(n)),
1334
+ internalSlots: props.internalSlots.map(n => (0, _detachedNode.asDetachedNode)(n)),
1335
+ inexact: props.inexact,
1336
+ exact: props.exact
1525
1337
  });
1526
1338
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1527
1339
  return node;
1528
1340
  }
1529
1341
 
1530
- function ObjectTypeCallProperty({
1531
- parent,
1532
- ...props
1533
- }) {
1534
- const node = (0, _detachedNode.detachedProps)(parent, {
1342
+ function ObjectTypeCallProperty(props) {
1343
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1535
1344
  type: 'ObjectTypeCallProperty',
1536
- ...props
1345
+ value: (0, _detachedNode.asDetachedNode)(props.value),
1346
+ static: props.static
1537
1347
  });
1538
1348
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1539
1349
  return node;
1540
1350
  }
1541
1351
 
1542
- function ObjectTypeIndexer({
1543
- parent,
1544
- ...props
1545
- }) {
1546
- const node = (0, _detachedNode.detachedProps)(parent, {
1352
+ function ObjectTypeIndexer(props) {
1353
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1547
1354
  type: 'ObjectTypeIndexer',
1548
- ...props
1355
+ id: (0, _detachedNode.asDetachedNode)(props.id),
1356
+ key: (0, _detachedNode.asDetachedNode)(props.key),
1357
+ value: (0, _detachedNode.asDetachedNode)(props.value),
1358
+ static: props.static,
1359
+ variance: (0, _detachedNode.asDetachedNode)(props.variance)
1549
1360
  });
1550
1361
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1551
1362
  return node;
1552
1363
  }
1553
1364
 
1554
- function ObjectTypeInternalSlot({
1555
- parent,
1556
- ...props
1557
- }) {
1558
- const node = (0, _detachedNode.detachedProps)(parent, {
1365
+ function ObjectTypeInternalSlot(props) {
1366
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1559
1367
  type: 'ObjectTypeInternalSlot',
1560
- ...props
1368
+ id: (0, _detachedNode.asDetachedNode)(props.id),
1369
+ value: (0, _detachedNode.asDetachedNode)(props.value),
1370
+ optional: props.optional,
1371
+ static: props.static,
1372
+ method: props.method
1561
1373
  });
1562
1374
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1563
1375
  return node;
1564
1376
  }
1565
1377
 
1566
- function ObjectTypeProperty({
1567
- parent,
1568
- ...props
1569
- }) {
1570
- const node = (0, _detachedNode.detachedProps)(parent, {
1378
+ function ObjectTypeProperty(props) {
1379
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1571
1380
  type: 'ObjectTypeProperty',
1572
- ...props
1381
+ key: (0, _detachedNode.asDetachedNode)(props.key),
1382
+ value: (0, _detachedNode.asDetachedNode)(props.value),
1383
+ method: props.method,
1384
+ optional: props.optional,
1385
+ static: props.static,
1386
+ proto: props.proto,
1387
+ variance: (0, _detachedNode.asDetachedNode)(props.variance),
1388
+ kind: props.kind
1573
1389
  });
1574
1390
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1575
1391
  return node;
1576
1392
  }
1577
1393
 
1578
- function ObjectTypeSpreadProperty({
1579
- parent,
1580
- ...props
1581
- }) {
1582
- const node = (0, _detachedNode.detachedProps)(parent, {
1394
+ function ObjectTypeSpreadProperty(props) {
1395
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1583
1396
  type: 'ObjectTypeSpreadProperty',
1584
- ...props
1397
+ argument: (0, _detachedNode.asDetachedNode)(props.argument)
1585
1398
  });
1586
1399
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1587
1400
  return node;
1588
1401
  }
1589
1402
 
1590
- function OpaqueType({
1591
- parent,
1592
- ...props
1593
- }) {
1594
- const node = (0, _detachedNode.detachedProps)(parent, {
1403
+ function OpaqueType(props) {
1404
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1595
1405
  type: 'OpaqueType',
1596
- ...props
1406
+ id: (0, _detachedNode.asDetachedNode)(props.id),
1407
+ typeParameters: (0, _detachedNode.asDetachedNode)(props.typeParameters),
1408
+ impltype: (0, _detachedNode.asDetachedNode)(props.impltype),
1409
+ supertype: (0, _detachedNode.asDetachedNode)(props.supertype)
1597
1410
  });
1598
1411
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1599
1412
  return node;
1600
1413
  }
1601
1414
 
1602
- function OptionalCallExpression({
1603
- parent,
1604
- ...props
1605
- }) {
1606
- const node = (0, _detachedNode.detachedProps)(parent, {
1607
- type: 'OptionalCallExpression',
1608
- ...props
1609
- });
1610
- (0, _detachedNode.setParentPointersInDirectChildren)(node);
1611
- return node;
1612
- }
1613
-
1614
- function OptionalIndexedAccessType({
1615
- parent,
1616
- ...props
1617
- }) {
1618
- const node = (0, _detachedNode.detachedProps)(parent, {
1415
+ function OptionalIndexedAccessType(props) {
1416
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1619
1417
  type: 'OptionalIndexedAccessType',
1620
- ...props
1418
+ objectType: (0, _detachedNode.asDetachedNode)(props.objectType),
1419
+ indexType: (0, _detachedNode.asDetachedNode)(props.indexType),
1420
+ optional: props.optional
1621
1421
  });
1622
1422
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1623
1423
  return node;
1624
1424
  }
1625
1425
 
1626
- function OptionalMemberExpression({
1627
- parent,
1628
- ...props
1629
- }) {
1630
- const node = (0, _detachedNode.detachedProps)(parent, {
1631
- type: 'OptionalMemberExpression',
1632
- ...props
1426
+ function PrivateIdentifier(props) {
1427
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1428
+ type: 'PrivateIdentifier',
1429
+ name: props.name
1633
1430
  });
1634
1431
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1635
1432
  return node;
1636
1433
  }
1637
1434
 
1638
- function PrivateName({
1639
- parent,
1640
- ...props
1641
- }) {
1642
- const node = (0, _detachedNode.detachedProps)(parent, {
1643
- type: 'PrivateName',
1644
- ...props
1435
+ function Property(props) {
1436
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1437
+ type: 'Property',
1438
+ key: (0, _detachedNode.asDetachedNode)(props.key),
1439
+ value: (0, _detachedNode.asDetachedNode)(props.value),
1440
+ kind: props.kind,
1441
+ computed: props.computed,
1442
+ method: props.method,
1443
+ shorthand: props.shorthand
1645
1444
  });
1646
1445
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1647
1446
  return node;
1648
1447
  }
1649
1448
 
1650
- function Property({
1651
- parent,
1652
- ...props
1653
- }) {
1654
- const node = (0, _detachedNode.detachedProps)(parent, {
1655
- type: 'Property',
1656
- ...props
1449
+ function PropertyDefinition(props) {
1450
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1451
+ type: 'PropertyDefinition',
1452
+ key: (0, _detachedNode.asDetachedNode)(props.key),
1453
+ value: (0, _detachedNode.asDetachedNode)(props.value),
1454
+ computed: props.computed,
1455
+ static: props.static,
1456
+ declare: props.declare,
1457
+ optional: props.optional,
1458
+ variance: (0, _detachedNode.asDetachedNode)(props.variance),
1459
+ typeAnnotation: (0, _detachedNode.asDetachedNode)(props.typeAnnotation)
1657
1460
  });
1658
1461
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1659
1462
  return node;
1660
1463
  }
1661
1464
 
1662
- function QualifiedTypeIdentifier({
1663
- parent,
1664
- ...props
1665
- }) {
1666
- const node = (0, _detachedNode.detachedProps)(parent, {
1465
+ function QualifiedTypeIdentifier(props) {
1466
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1667
1467
  type: 'QualifiedTypeIdentifier',
1668
- ...props
1468
+ qualification: (0, _detachedNode.asDetachedNode)(props.qualification),
1469
+ id: (0, _detachedNode.asDetachedNode)(props.id)
1669
1470
  });
1670
1471
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1671
1472
  return node;
1672
1473
  }
1673
1474
 
1674
- function RestElement({
1675
- parent,
1676
- ...props
1677
- }) {
1678
- const node = (0, _detachedNode.detachedProps)(parent, {
1475
+ function RestElement(props) {
1476
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1679
1477
  type: 'RestElement',
1680
- ...props
1478
+ argument: (0, _detachedNode.asDetachedNode)(props.argument)
1681
1479
  });
1682
1480
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1683
1481
  return node;
1684
1482
  }
1685
1483
 
1686
- function ReturnStatement({
1687
- parent,
1688
- ...props
1689
- }) {
1690
- const node = (0, _detachedNode.detachedProps)(parent, {
1484
+ function ReturnStatement(props) {
1485
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1691
1486
  type: 'ReturnStatement',
1692
- ...props
1487
+ argument: (0, _detachedNode.asDetachedNode)(props.argument)
1693
1488
  });
1694
1489
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1695
1490
  return node;
1696
1491
  }
1697
1492
 
1698
- function SequenceExpression({
1699
- parent,
1700
- ...props
1701
- }) {
1702
- const node = (0, _detachedNode.detachedProps)(parent, {
1493
+ function SequenceExpression(props) {
1494
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1703
1495
  type: 'SequenceExpression',
1704
- ...props
1496
+ expressions: props.expressions.map(n => (0, _detachedNode.asDetachedNode)(n))
1705
1497
  });
1706
1498
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1707
1499
  return node;
1708
1500
  }
1709
1501
 
1710
- function SpreadElement({
1711
- parent,
1712
- ...props
1713
- }) {
1714
- const node = (0, _detachedNode.detachedProps)(parent, {
1502
+ function SpreadElement(props) {
1503
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1715
1504
  type: 'SpreadElement',
1716
- ...props
1505
+ argument: (0, _detachedNode.asDetachedNode)(props.argument)
1717
1506
  });
1718
1507
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1719
1508
  return node;
1720
1509
  }
1721
1510
 
1722
- function StringLiteralTypeAnnotation({
1723
- parent,
1724
- ...props
1725
- }) {
1726
- const node = (0, _detachedNode.detachedProps)(parent, {
1511
+ function StringLiteralTypeAnnotation(props) {
1512
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1727
1513
  type: 'StringLiteralTypeAnnotation',
1728
- ...props
1514
+ value: props.value,
1515
+ raw: props.raw
1729
1516
  });
1730
1517
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1731
1518
  return node;
1732
1519
  }
1733
1520
 
1734
- function StringTypeAnnotation({
1735
- parent
1736
- } = {}) {
1737
- return (0, _detachedNode.detachedProps)(parent, {
1521
+ function StringTypeAnnotation(props = { ...null
1522
+ }) {
1523
+ return (0, _detachedNode.detachedProps)(props.parent, {
1738
1524
  type: 'StringTypeAnnotation'
1739
1525
  });
1740
1526
  }
1741
1527
 
1742
- function Super({
1743
- parent
1744
- } = {}) {
1745
- return (0, _detachedNode.detachedProps)(parent, {
1528
+ function Super(props = { ...null
1529
+ }) {
1530
+ return (0, _detachedNode.detachedProps)(props.parent, {
1746
1531
  type: 'Super'
1747
1532
  });
1748
1533
  }
1749
1534
 
1750
- function SwitchCase({
1751
- parent,
1752
- ...props
1753
- }) {
1754
- const node = (0, _detachedNode.detachedProps)(parent, {
1535
+ function SwitchCase(props) {
1536
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1755
1537
  type: 'SwitchCase',
1756
- ...props
1538
+ test: (0, _detachedNode.asDetachedNode)(props.test),
1539
+ consequent: props.consequent.map(n => (0, _detachedNode.asDetachedNode)(n))
1757
1540
  });
1758
1541
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1759
1542
  return node;
1760
1543
  }
1761
1544
 
1762
- function SwitchStatement({
1763
- parent,
1764
- ...props
1765
- }) {
1766
- const node = (0, _detachedNode.detachedProps)(parent, {
1545
+ function SwitchStatement(props) {
1546
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1767
1547
  type: 'SwitchStatement',
1768
- ...props
1548
+ discriminant: (0, _detachedNode.asDetachedNode)(props.discriminant),
1549
+ cases: props.cases.map(n => (0, _detachedNode.asDetachedNode)(n))
1769
1550
  });
1770
1551
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1771
1552
  return node;
1772
1553
  }
1773
1554
 
1774
- function SymbolTypeAnnotation({
1775
- parent
1776
- } = {}) {
1777
- return (0, _detachedNode.detachedProps)(parent, {
1555
+ function SymbolTypeAnnotation(props = { ...null
1556
+ }) {
1557
+ return (0, _detachedNode.detachedProps)(props.parent, {
1778
1558
  type: 'SymbolTypeAnnotation'
1779
1559
  });
1780
1560
  }
1781
1561
 
1782
- function TaggedTemplateExpression({
1783
- parent,
1784
- ...props
1785
- }) {
1786
- const node = (0, _detachedNode.detachedProps)(parent, {
1562
+ function TaggedTemplateExpression(props) {
1563
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1787
1564
  type: 'TaggedTemplateExpression',
1788
- ...props
1565
+ tag: (0, _detachedNode.asDetachedNode)(props.tag),
1566
+ quasi: (0, _detachedNode.asDetachedNode)(props.quasi)
1789
1567
  });
1790
1568
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1791
1569
  return node;
1792
1570
  }
1793
1571
 
1794
- function TemplateLiteral({
1795
- parent,
1796
- ...props
1797
- }) {
1798
- const node = (0, _detachedNode.detachedProps)(parent, {
1572
+ function TemplateLiteral(props) {
1573
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1799
1574
  type: 'TemplateLiteral',
1800
- ...props
1575
+ quasis: props.quasis.map(n => (0, _detachedNode.asDetachedNode)(n)),
1576
+ expressions: props.expressions.map(n => (0, _detachedNode.asDetachedNode)(n))
1801
1577
  });
1802
1578
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1803
1579
  return node;
1804
1580
  }
1805
1581
 
1806
- function ThisExpression({
1807
- parent
1808
- } = {}) {
1809
- return (0, _detachedNode.detachedProps)(parent, {
1582
+ function ThisExpression(props = { ...null
1583
+ }) {
1584
+ return (0, _detachedNode.detachedProps)(props.parent, {
1810
1585
  type: 'ThisExpression'
1811
1586
  });
1812
1587
  }
1813
1588
 
1814
- function ThisTypeAnnotation({
1815
- parent
1816
- } = {}) {
1817
- return (0, _detachedNode.detachedProps)(parent, {
1589
+ function ThisTypeAnnotation(props = { ...null
1590
+ }) {
1591
+ return (0, _detachedNode.detachedProps)(props.parent, {
1818
1592
  type: 'ThisTypeAnnotation'
1819
1593
  });
1820
1594
  }
1821
1595
 
1822
- function ThrowStatement({
1823
- parent,
1824
- ...props
1825
- }) {
1826
- const node = (0, _detachedNode.detachedProps)(parent, {
1596
+ function ThrowStatement(props) {
1597
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1827
1598
  type: 'ThrowStatement',
1828
- ...props
1599
+ argument: (0, _detachedNode.asDetachedNode)(props.argument)
1829
1600
  });
1830
1601
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1831
1602
  return node;
1832
1603
  }
1833
1604
 
1834
- function TryStatement({
1835
- parent,
1836
- ...props
1837
- }) {
1838
- const node = (0, _detachedNode.detachedProps)(parent, {
1605
+ function TryStatement(props) {
1606
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1839
1607
  type: 'TryStatement',
1840
- ...props
1608
+ block: (0, _detachedNode.asDetachedNode)(props.block),
1609
+ handler: (0, _detachedNode.asDetachedNode)(props.handler),
1610
+ finalizer: (0, _detachedNode.asDetachedNode)(props.finalizer)
1841
1611
  });
1842
1612
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1843
1613
  return node;
1844
1614
  }
1845
1615
 
1846
- function TupleTypeAnnotation({
1847
- parent,
1848
- ...props
1849
- }) {
1850
- const node = (0, _detachedNode.detachedProps)(parent, {
1616
+ function TupleTypeAnnotation(props) {
1617
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1851
1618
  type: 'TupleTypeAnnotation',
1852
- ...props
1619
+ types: props.types.map(n => (0, _detachedNode.asDetachedNode)(n))
1853
1620
  });
1854
1621
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1855
1622
  return node;
1856
1623
  }
1857
1624
 
1858
- function TypeAlias({
1859
- parent,
1860
- ...props
1861
- }) {
1862
- const node = (0, _detachedNode.detachedProps)(parent, {
1625
+ function TypeAlias(props) {
1626
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1863
1627
  type: 'TypeAlias',
1864
- ...props
1628
+ id: (0, _detachedNode.asDetachedNode)(props.id),
1629
+ typeParameters: (0, _detachedNode.asDetachedNode)(props.typeParameters),
1630
+ right: (0, _detachedNode.asDetachedNode)(props.right)
1865
1631
  });
1866
1632
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1867
1633
  return node;
1868
1634
  }
1869
1635
 
1870
- function TypeAnnotation({
1871
- parent,
1872
- ...props
1873
- }) {
1874
- const node = (0, _detachedNode.detachedProps)(parent, {
1636
+ function TypeAnnotation(props) {
1637
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1875
1638
  type: 'TypeAnnotation',
1876
- ...props
1639
+ typeAnnotation: (0, _detachedNode.asDetachedNode)(props.typeAnnotation)
1877
1640
  });
1878
1641
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1879
1642
  return node;
1880
1643
  }
1881
1644
 
1882
- function TypeCastExpression({
1883
- parent,
1884
- ...props
1885
- }) {
1886
- const node = (0, _detachedNode.detachedProps)(parent, {
1645
+ function TypeCastExpression(props) {
1646
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1887
1647
  type: 'TypeCastExpression',
1888
- ...props
1648
+ expression: (0, _detachedNode.asDetachedNode)(props.expression),
1649
+ typeAnnotation: (0, _detachedNode.asDetachedNode)(props.typeAnnotation)
1889
1650
  });
1890
1651
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1891
1652
  return node;
1892
1653
  }
1893
1654
 
1894
- function TypeofTypeAnnotation({
1895
- parent,
1896
- ...props
1897
- }) {
1898
- const node = (0, _detachedNode.detachedProps)(parent, {
1655
+ function TypeofTypeAnnotation(props) {
1656
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1899
1657
  type: 'TypeofTypeAnnotation',
1900
- ...props
1658
+ argument: (0, _detachedNode.asDetachedNode)(props.argument)
1901
1659
  });
1902
1660
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1903
1661
  return node;
1904
1662
  }
1905
1663
 
1906
- function TypeParameter({
1907
- parent,
1908
- ...props
1909
- }) {
1910
- const node = (0, _detachedNode.detachedProps)(parent, {
1664
+ function TypeParameter(props) {
1665
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1911
1666
  type: 'TypeParameter',
1912
- ...props
1667
+ name: props.name,
1668
+ bound: (0, _detachedNode.asDetachedNode)(props.bound),
1669
+ variance: (0, _detachedNode.asDetachedNode)(props.variance),
1670
+ default: (0, _detachedNode.asDetachedNode)(props.default)
1913
1671
  });
1914
1672
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1915
1673
  return node;
1916
1674
  }
1917
1675
 
1918
- function TypeParameterDeclaration({
1919
- parent,
1920
- ...props
1921
- }) {
1922
- const node = (0, _detachedNode.detachedProps)(parent, {
1676
+ function TypeParameterDeclaration(props) {
1677
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1923
1678
  type: 'TypeParameterDeclaration',
1924
- ...props
1679
+ params: props.params.map(n => (0, _detachedNode.asDetachedNode)(n))
1925
1680
  });
1926
1681
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1927
1682
  return node;
1928
1683
  }
1929
1684
 
1930
- function TypeParameterInstantiation({
1931
- parent,
1932
- ...props
1933
- }) {
1934
- const node = (0, _detachedNode.detachedProps)(parent, {
1685
+ function TypeParameterInstantiation(props) {
1686
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1935
1687
  type: 'TypeParameterInstantiation',
1936
- ...props
1688
+ params: props.params.map(n => (0, _detachedNode.asDetachedNode)(n))
1937
1689
  });
1938
1690
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1939
1691
  return node;
1940
1692
  }
1941
1693
 
1942
- function UnaryExpression({
1943
- parent,
1944
- ...props
1945
- }) {
1946
- const node = (0, _detachedNode.detachedProps)(parent, {
1694
+ function UnaryExpression(props) {
1695
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1947
1696
  type: 'UnaryExpression',
1948
- ...props
1697
+ operator: props.operator,
1698
+ argument: (0, _detachedNode.asDetachedNode)(props.argument),
1699
+ prefix: props.prefix
1949
1700
  });
1950
1701
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1951
1702
  return node;
1952
1703
  }
1953
1704
 
1954
- function UnionTypeAnnotation({
1955
- parent,
1956
- ...props
1957
- }) {
1958
- const node = (0, _detachedNode.detachedProps)(parent, {
1705
+ function UnionTypeAnnotation(props) {
1706
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1959
1707
  type: 'UnionTypeAnnotation',
1960
- ...props
1708
+ types: props.types.map(n => (0, _detachedNode.asDetachedNode)(n))
1961
1709
  });
1962
1710
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1963
1711
  return node;
1964
1712
  }
1965
1713
 
1966
- function UpdateExpression({
1967
- parent,
1968
- ...props
1969
- }) {
1970
- const node = (0, _detachedNode.detachedProps)(parent, {
1714
+ function UpdateExpression(props) {
1715
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1971
1716
  type: 'UpdateExpression',
1972
- ...props
1717
+ operator: props.operator,
1718
+ argument: (0, _detachedNode.asDetachedNode)(props.argument),
1719
+ prefix: props.prefix
1973
1720
  });
1974
1721
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1975
1722
  return node;
1976
1723
  }
1977
1724
 
1978
- function VariableDeclaration({
1979
- parent,
1980
- ...props
1981
- }) {
1982
- const node = (0, _detachedNode.detachedProps)(parent, {
1725
+ function VariableDeclaration(props) {
1726
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1983
1727
  type: 'VariableDeclaration',
1984
- ...props
1728
+ kind: props.kind,
1729
+ declarations: props.declarations.map(n => (0, _detachedNode.asDetachedNode)(n))
1985
1730
  });
1986
1731
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1987
1732
  return node;
1988
1733
  }
1989
1734
 
1990
- function VariableDeclarator({
1991
- parent,
1992
- ...props
1993
- }) {
1994
- const node = (0, _detachedNode.detachedProps)(parent, {
1735
+ function VariableDeclarator(props) {
1736
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
1995
1737
  type: 'VariableDeclarator',
1996
- ...props
1738
+ init: (0, _detachedNode.asDetachedNode)(props.init),
1739
+ id: (0, _detachedNode.asDetachedNode)(props.id)
1997
1740
  });
1998
1741
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
1999
1742
  return node;
2000
1743
  }
2001
1744
 
2002
- function Variance({
2003
- parent,
2004
- ...props
2005
- }) {
2006
- const node = (0, _detachedNode.detachedProps)(parent, {
1745
+ function Variance(props) {
1746
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
2007
1747
  type: 'Variance',
2008
- ...props
1748
+ kind: props.kind
2009
1749
  });
2010
1750
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
2011
1751
  return node;
2012
1752
  }
2013
1753
 
2014
- function VoidTypeAnnotation({
2015
- parent
2016
- } = {}) {
2017
- return (0, _detachedNode.detachedProps)(parent, {
1754
+ function VoidTypeAnnotation(props = { ...null
1755
+ }) {
1756
+ return (0, _detachedNode.detachedProps)(props.parent, {
2018
1757
  type: 'VoidTypeAnnotation'
2019
1758
  });
2020
1759
  }
2021
1760
 
2022
- function WhileStatement({
2023
- parent,
2024
- ...props
2025
- }) {
2026
- const node = (0, _detachedNode.detachedProps)(parent, {
1761
+ function WhileStatement(props) {
1762
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
2027
1763
  type: 'WhileStatement',
2028
- ...props
1764
+ body: (0, _detachedNode.asDetachedNode)(props.body),
1765
+ test: (0, _detachedNode.asDetachedNode)(props.test)
2029
1766
  });
2030
1767
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
2031
1768
  return node;
2032
1769
  }
2033
1770
 
2034
- function WithStatement({
2035
- parent,
2036
- ...props
2037
- }) {
2038
- const node = (0, _detachedNode.detachedProps)(parent, {
1771
+ function WithStatement(props) {
1772
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
2039
1773
  type: 'WithStatement',
2040
- ...props
1774
+ object: (0, _detachedNode.asDetachedNode)(props.object),
1775
+ body: (0, _detachedNode.asDetachedNode)(props.body)
2041
1776
  });
2042
1777
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
2043
1778
  return node;
2044
1779
  }
2045
1780
 
2046
- function YieldExpression({
2047
- parent,
2048
- ...props
2049
- }) {
2050
- const node = (0, _detachedNode.detachedProps)(parent, {
1781
+ function YieldExpression(props) {
1782
+ const node = (0, _detachedNode.detachedProps)(props.parent, {
2051
1783
  type: 'YieldExpression',
2052
- ...props
1784
+ argument: (0, _detachedNode.asDetachedNode)(props.argument),
1785
+ delegate: props.delegate
2053
1786
  });
2054
1787
  (0, _detachedNode.setParentPointersInDirectChildren)(node);
2055
1788
  return node;