hermes-transform 0.25.0 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/TransformCloneSignatures.js.flow +187 -0
- package/dist/generated/TransformModifySignatures.js.flow +119 -0
- package/dist/generated/TransformReplaceSignatures.js.flow +119 -0
- package/dist/generated/node-types.js +200 -0
- package/dist/generated/node-types.js.flow +355 -0
- package/package.json +5 -5
|
@@ -134,6 +134,22 @@ import type {
|
|
|
134
134
|
KeyofTypeAnnotation,
|
|
135
135
|
LabeledStatement,
|
|
136
136
|
LogicalExpression,
|
|
137
|
+
MatchArrayPattern,
|
|
138
|
+
MatchAsPattern,
|
|
139
|
+
MatchBindingPattern,
|
|
140
|
+
MatchExpression,
|
|
141
|
+
MatchExpressionCase,
|
|
142
|
+
MatchIdentifierPattern,
|
|
143
|
+
MatchLiteralPattern,
|
|
144
|
+
MatchMemberPattern,
|
|
145
|
+
MatchObjectPattern,
|
|
146
|
+
MatchObjectPatternProperty,
|
|
147
|
+
MatchOrPattern,
|
|
148
|
+
MatchRestPattern,
|
|
149
|
+
MatchStatement,
|
|
150
|
+
MatchStatementCase,
|
|
151
|
+
MatchUnaryPattern,
|
|
152
|
+
MatchWildcardPattern,
|
|
137
153
|
MemberExpression,
|
|
138
154
|
MetaProperty,
|
|
139
155
|
MethodDefinition,
|
|
@@ -167,6 +183,7 @@ import type {
|
|
|
167
183
|
ReturnStatement,
|
|
168
184
|
SequenceExpression,
|
|
169
185
|
SpreadElement,
|
|
186
|
+
StaticBlock,
|
|
170
187
|
StringLiteral,
|
|
171
188
|
StringLiteralTypeAnnotation,
|
|
172
189
|
StringTypeAnnotation,
|
|
@@ -317,6 +334,22 @@ import type {
|
|
|
317
334
|
KeyofTypeAnnotationProps,
|
|
318
335
|
LabeledStatementProps,
|
|
319
336
|
LogicalExpressionProps,
|
|
337
|
+
MatchArrayPatternProps,
|
|
338
|
+
MatchAsPatternProps,
|
|
339
|
+
MatchBindingPatternProps,
|
|
340
|
+
MatchExpressionProps,
|
|
341
|
+
MatchExpressionCaseProps,
|
|
342
|
+
MatchIdentifierPatternProps,
|
|
343
|
+
MatchLiteralPatternProps,
|
|
344
|
+
MatchMemberPatternProps,
|
|
345
|
+
MatchObjectPatternProps,
|
|
346
|
+
MatchObjectPatternPropertyProps,
|
|
347
|
+
MatchOrPatternProps,
|
|
348
|
+
MatchRestPatternProps,
|
|
349
|
+
MatchStatementProps,
|
|
350
|
+
MatchStatementCaseProps,
|
|
351
|
+
MatchUnaryPatternProps,
|
|
352
|
+
MatchWildcardPatternProps,
|
|
320
353
|
MemberExpressionProps,
|
|
321
354
|
MetaPropertyProps,
|
|
322
355
|
MethodDefinitionProps,
|
|
@@ -350,6 +383,7 @@ import type {
|
|
|
350
383
|
ReturnStatementProps,
|
|
351
384
|
SequenceExpressionProps,
|
|
352
385
|
SpreadElementProps,
|
|
386
|
+
StaticBlockProps,
|
|
353
387
|
StringLiteralProps,
|
|
354
388
|
StringLiteralTypeAnnotationProps,
|
|
355
389
|
StringTypeAnnotationProps,
|
|
@@ -1285,6 +1319,134 @@ type LogicalExpressionCloneSignature = ((
|
|
|
1285
1319
|
node: ?LogicalExpression,
|
|
1286
1320
|
newProps: Partial<LogicalExpressionProps>,
|
|
1287
1321
|
) => DetachedNode<LogicalExpression> | null);
|
|
1322
|
+
type MatchArrayPatternCloneSignature = ((
|
|
1323
|
+
node: MatchArrayPattern,
|
|
1324
|
+
newProps: Partial<MatchArrayPatternProps>,
|
|
1325
|
+
) => DetachedNode<MatchArrayPattern>) &
|
|
1326
|
+
((
|
|
1327
|
+
node: ?MatchArrayPattern,
|
|
1328
|
+
newProps: Partial<MatchArrayPatternProps>,
|
|
1329
|
+
) => DetachedNode<MatchArrayPattern> | null);
|
|
1330
|
+
type MatchAsPatternCloneSignature = ((
|
|
1331
|
+
node: MatchAsPattern,
|
|
1332
|
+
newProps: Partial<MatchAsPatternProps>,
|
|
1333
|
+
) => DetachedNode<MatchAsPattern>) &
|
|
1334
|
+
((
|
|
1335
|
+
node: ?MatchAsPattern,
|
|
1336
|
+
newProps: Partial<MatchAsPatternProps>,
|
|
1337
|
+
) => DetachedNode<MatchAsPattern> | null);
|
|
1338
|
+
type MatchBindingPatternCloneSignature = ((
|
|
1339
|
+
node: MatchBindingPattern,
|
|
1340
|
+
newProps: Partial<MatchBindingPatternProps>,
|
|
1341
|
+
) => DetachedNode<MatchBindingPattern>) &
|
|
1342
|
+
((
|
|
1343
|
+
node: ?MatchBindingPattern,
|
|
1344
|
+
newProps: Partial<MatchBindingPatternProps>,
|
|
1345
|
+
) => DetachedNode<MatchBindingPattern> | null);
|
|
1346
|
+
type MatchExpressionCloneSignature = ((
|
|
1347
|
+
node: MatchExpression,
|
|
1348
|
+
newProps: Partial<MatchExpressionProps>,
|
|
1349
|
+
) => DetachedNode<MatchExpression>) &
|
|
1350
|
+
((
|
|
1351
|
+
node: ?MatchExpression,
|
|
1352
|
+
newProps: Partial<MatchExpressionProps>,
|
|
1353
|
+
) => DetachedNode<MatchExpression> | null);
|
|
1354
|
+
type MatchExpressionCaseCloneSignature = ((
|
|
1355
|
+
node: MatchExpressionCase,
|
|
1356
|
+
newProps: Partial<MatchExpressionCaseProps>,
|
|
1357
|
+
) => DetachedNode<MatchExpressionCase>) &
|
|
1358
|
+
((
|
|
1359
|
+
node: ?MatchExpressionCase,
|
|
1360
|
+
newProps: Partial<MatchExpressionCaseProps>,
|
|
1361
|
+
) => DetachedNode<MatchExpressionCase> | null);
|
|
1362
|
+
type MatchIdentifierPatternCloneSignature = ((
|
|
1363
|
+
node: MatchIdentifierPattern,
|
|
1364
|
+
newProps: Partial<MatchIdentifierPatternProps>,
|
|
1365
|
+
) => DetachedNode<MatchIdentifierPattern>) &
|
|
1366
|
+
((
|
|
1367
|
+
node: ?MatchIdentifierPattern,
|
|
1368
|
+
newProps: Partial<MatchIdentifierPatternProps>,
|
|
1369
|
+
) => DetachedNode<MatchIdentifierPattern> | null);
|
|
1370
|
+
type MatchLiteralPatternCloneSignature = ((
|
|
1371
|
+
node: MatchLiteralPattern,
|
|
1372
|
+
newProps: Partial<MatchLiteralPatternProps>,
|
|
1373
|
+
) => DetachedNode<MatchLiteralPattern>) &
|
|
1374
|
+
((
|
|
1375
|
+
node: ?MatchLiteralPattern,
|
|
1376
|
+
newProps: Partial<MatchLiteralPatternProps>,
|
|
1377
|
+
) => DetachedNode<MatchLiteralPattern> | null);
|
|
1378
|
+
type MatchMemberPatternCloneSignature = ((
|
|
1379
|
+
node: MatchMemberPattern,
|
|
1380
|
+
newProps: Partial<MatchMemberPatternProps>,
|
|
1381
|
+
) => DetachedNode<MatchMemberPattern>) &
|
|
1382
|
+
((
|
|
1383
|
+
node: ?MatchMemberPattern,
|
|
1384
|
+
newProps: Partial<MatchMemberPatternProps>,
|
|
1385
|
+
) => DetachedNode<MatchMemberPattern> | null);
|
|
1386
|
+
type MatchObjectPatternCloneSignature = ((
|
|
1387
|
+
node: MatchObjectPattern,
|
|
1388
|
+
newProps: Partial<MatchObjectPatternProps>,
|
|
1389
|
+
) => DetachedNode<MatchObjectPattern>) &
|
|
1390
|
+
((
|
|
1391
|
+
node: ?MatchObjectPattern,
|
|
1392
|
+
newProps: Partial<MatchObjectPatternProps>,
|
|
1393
|
+
) => DetachedNode<MatchObjectPattern> | null);
|
|
1394
|
+
type MatchObjectPatternPropertyCloneSignature = ((
|
|
1395
|
+
node: MatchObjectPatternProperty,
|
|
1396
|
+
newProps: Partial<MatchObjectPatternPropertyProps>,
|
|
1397
|
+
) => DetachedNode<MatchObjectPatternProperty>) &
|
|
1398
|
+
((
|
|
1399
|
+
node: ?MatchObjectPatternProperty,
|
|
1400
|
+
newProps: Partial<MatchObjectPatternPropertyProps>,
|
|
1401
|
+
) => DetachedNode<MatchObjectPatternProperty> | null);
|
|
1402
|
+
type MatchOrPatternCloneSignature = ((
|
|
1403
|
+
node: MatchOrPattern,
|
|
1404
|
+
newProps: Partial<MatchOrPatternProps>,
|
|
1405
|
+
) => DetachedNode<MatchOrPattern>) &
|
|
1406
|
+
((
|
|
1407
|
+
node: ?MatchOrPattern,
|
|
1408
|
+
newProps: Partial<MatchOrPatternProps>,
|
|
1409
|
+
) => DetachedNode<MatchOrPattern> | null);
|
|
1410
|
+
type MatchRestPatternCloneSignature = ((
|
|
1411
|
+
node: MatchRestPattern,
|
|
1412
|
+
newProps: Partial<MatchRestPatternProps>,
|
|
1413
|
+
) => DetachedNode<MatchRestPattern>) &
|
|
1414
|
+
((
|
|
1415
|
+
node: ?MatchRestPattern,
|
|
1416
|
+
newProps: Partial<MatchRestPatternProps>,
|
|
1417
|
+
) => DetachedNode<MatchRestPattern> | null);
|
|
1418
|
+
type MatchStatementCloneSignature = ((
|
|
1419
|
+
node: MatchStatement,
|
|
1420
|
+
newProps: Partial<MatchStatementProps>,
|
|
1421
|
+
) => DetachedNode<MatchStatement>) &
|
|
1422
|
+
((
|
|
1423
|
+
node: ?MatchStatement,
|
|
1424
|
+
newProps: Partial<MatchStatementProps>,
|
|
1425
|
+
) => DetachedNode<MatchStatement> | null);
|
|
1426
|
+
type MatchStatementCaseCloneSignature = ((
|
|
1427
|
+
node: MatchStatementCase,
|
|
1428
|
+
newProps: Partial<MatchStatementCaseProps>,
|
|
1429
|
+
) => DetachedNode<MatchStatementCase>) &
|
|
1430
|
+
((
|
|
1431
|
+
node: ?MatchStatementCase,
|
|
1432
|
+
newProps: Partial<MatchStatementCaseProps>,
|
|
1433
|
+
) => DetachedNode<MatchStatementCase> | null);
|
|
1434
|
+
type MatchUnaryPatternCloneSignature = ((
|
|
1435
|
+
node: MatchUnaryPattern,
|
|
1436
|
+
newProps: Partial<MatchUnaryPatternProps>,
|
|
1437
|
+
) => DetachedNode<MatchUnaryPattern>) &
|
|
1438
|
+
((
|
|
1439
|
+
node: ?MatchUnaryPattern,
|
|
1440
|
+
newProps: Partial<MatchUnaryPatternProps>,
|
|
1441
|
+
) => DetachedNode<MatchUnaryPattern> | null);
|
|
1442
|
+
type MatchWildcardPatternCloneSignature = ((
|
|
1443
|
+
node: MatchWildcardPattern,
|
|
1444
|
+
newProps: Partial<MatchWildcardPatternProps>,
|
|
1445
|
+
) => DetachedNode<MatchWildcardPattern>) &
|
|
1446
|
+
((
|
|
1447
|
+
node: ?MatchWildcardPattern,
|
|
1448
|
+
newProps: Partial<MatchWildcardPatternProps>,
|
|
1449
|
+
) => DetachedNode<MatchWildcardPattern> | null);
|
|
1288
1450
|
type MemberExpressionCloneSignature = ((
|
|
1289
1451
|
node: MemberExpression,
|
|
1290
1452
|
newProps: Partial<MemberExpressionProps>,
|
|
@@ -1549,6 +1711,14 @@ type SpreadElementCloneSignature = ((
|
|
|
1549
1711
|
node: ?SpreadElement,
|
|
1550
1712
|
newProps: Partial<SpreadElementProps>,
|
|
1551
1713
|
) => DetachedNode<SpreadElement> | null);
|
|
1714
|
+
type StaticBlockCloneSignature = ((
|
|
1715
|
+
node: StaticBlock,
|
|
1716
|
+
newProps: Partial<StaticBlockProps>,
|
|
1717
|
+
) => DetachedNode<StaticBlock>) &
|
|
1718
|
+
((
|
|
1719
|
+
node: ?StaticBlock,
|
|
1720
|
+
newProps: Partial<StaticBlockProps>,
|
|
1721
|
+
) => DetachedNode<StaticBlock> | null);
|
|
1552
1722
|
type StringLiteralCloneSignature = ((
|
|
1553
1723
|
node: StringLiteral,
|
|
1554
1724
|
newProps: Partial<StringLiteralProps>,
|
|
@@ -1946,6 +2116,22 @@ export type TransformCloneSignatures = AnyTypeAnnotationCloneSignature &
|
|
|
1946
2116
|
KeyofTypeAnnotationCloneSignature &
|
|
1947
2117
|
LabeledStatementCloneSignature &
|
|
1948
2118
|
LogicalExpressionCloneSignature &
|
|
2119
|
+
MatchArrayPatternCloneSignature &
|
|
2120
|
+
MatchAsPatternCloneSignature &
|
|
2121
|
+
MatchBindingPatternCloneSignature &
|
|
2122
|
+
MatchExpressionCloneSignature &
|
|
2123
|
+
MatchExpressionCaseCloneSignature &
|
|
2124
|
+
MatchIdentifierPatternCloneSignature &
|
|
2125
|
+
MatchLiteralPatternCloneSignature &
|
|
2126
|
+
MatchMemberPatternCloneSignature &
|
|
2127
|
+
MatchObjectPatternCloneSignature &
|
|
2128
|
+
MatchObjectPatternPropertyCloneSignature &
|
|
2129
|
+
MatchOrPatternCloneSignature &
|
|
2130
|
+
MatchRestPatternCloneSignature &
|
|
2131
|
+
MatchStatementCloneSignature &
|
|
2132
|
+
MatchStatementCaseCloneSignature &
|
|
2133
|
+
MatchUnaryPatternCloneSignature &
|
|
2134
|
+
MatchWildcardPatternCloneSignature &
|
|
1949
2135
|
MemberExpressionCloneSignature &
|
|
1950
2136
|
MetaPropertyCloneSignature &
|
|
1951
2137
|
MethodDefinitionCloneSignature &
|
|
@@ -1979,6 +2165,7 @@ export type TransformCloneSignatures = AnyTypeAnnotationCloneSignature &
|
|
|
1979
2165
|
ReturnStatementCloneSignature &
|
|
1980
2166
|
SequenceExpressionCloneSignature &
|
|
1981
2167
|
SpreadElementCloneSignature &
|
|
2168
|
+
StaticBlockCloneSignature &
|
|
1982
2169
|
StringLiteralCloneSignature &
|
|
1983
2170
|
StringLiteralTypeAnnotationCloneSignature &
|
|
1984
2171
|
StringTypeAnnotationCloneSignature &
|
|
@@ -134,6 +134,22 @@ import type {
|
|
|
134
134
|
KeyofTypeAnnotation,
|
|
135
135
|
LabeledStatement,
|
|
136
136
|
LogicalExpression,
|
|
137
|
+
MatchArrayPattern,
|
|
138
|
+
MatchAsPattern,
|
|
139
|
+
MatchBindingPattern,
|
|
140
|
+
MatchExpression,
|
|
141
|
+
MatchExpressionCase,
|
|
142
|
+
MatchIdentifierPattern,
|
|
143
|
+
MatchLiteralPattern,
|
|
144
|
+
MatchMemberPattern,
|
|
145
|
+
MatchObjectPattern,
|
|
146
|
+
MatchObjectPatternProperty,
|
|
147
|
+
MatchOrPattern,
|
|
148
|
+
MatchRestPattern,
|
|
149
|
+
MatchStatement,
|
|
150
|
+
MatchStatementCase,
|
|
151
|
+
MatchUnaryPattern,
|
|
152
|
+
MatchWildcardPattern,
|
|
137
153
|
MemberExpression,
|
|
138
154
|
MetaProperty,
|
|
139
155
|
MethodDefinition,
|
|
@@ -167,6 +183,7 @@ import type {
|
|
|
167
183
|
ReturnStatement,
|
|
168
184
|
SequenceExpression,
|
|
169
185
|
SpreadElement,
|
|
186
|
+
StaticBlock,
|
|
170
187
|
StringLiteral,
|
|
171
188
|
StringLiteralTypeAnnotation,
|
|
172
189
|
StringTypeAnnotation,
|
|
@@ -317,6 +334,22 @@ import type {
|
|
|
317
334
|
KeyofTypeAnnotationProps,
|
|
318
335
|
LabeledStatementProps,
|
|
319
336
|
LogicalExpressionProps,
|
|
337
|
+
MatchArrayPatternProps,
|
|
338
|
+
MatchAsPatternProps,
|
|
339
|
+
MatchBindingPatternProps,
|
|
340
|
+
MatchExpressionProps,
|
|
341
|
+
MatchExpressionCaseProps,
|
|
342
|
+
MatchIdentifierPatternProps,
|
|
343
|
+
MatchLiteralPatternProps,
|
|
344
|
+
MatchMemberPatternProps,
|
|
345
|
+
MatchObjectPatternProps,
|
|
346
|
+
MatchObjectPatternPropertyProps,
|
|
347
|
+
MatchOrPatternProps,
|
|
348
|
+
MatchRestPatternProps,
|
|
349
|
+
MatchStatementProps,
|
|
350
|
+
MatchStatementCaseProps,
|
|
351
|
+
MatchUnaryPatternProps,
|
|
352
|
+
MatchWildcardPatternProps,
|
|
320
353
|
MemberExpressionProps,
|
|
321
354
|
MetaPropertyProps,
|
|
322
355
|
MethodDefinitionProps,
|
|
@@ -350,6 +383,7 @@ import type {
|
|
|
350
383
|
ReturnStatementProps,
|
|
351
384
|
SequenceExpressionProps,
|
|
352
385
|
SpreadElementProps,
|
|
386
|
+
StaticBlockProps,
|
|
353
387
|
StringLiteralProps,
|
|
354
388
|
StringLiteralTypeAnnotationProps,
|
|
355
389
|
StringTypeAnnotationProps,
|
|
@@ -836,6 +870,70 @@ type LogicalExpressionModifySignature = (
|
|
|
836
870
|
node: ?LogicalExpression,
|
|
837
871
|
newProps: Partial<LogicalExpressionProps>,
|
|
838
872
|
) => void;
|
|
873
|
+
type MatchArrayPatternModifySignature = (
|
|
874
|
+
node: ?MatchArrayPattern,
|
|
875
|
+
newProps: Partial<MatchArrayPatternProps>,
|
|
876
|
+
) => void;
|
|
877
|
+
type MatchAsPatternModifySignature = (
|
|
878
|
+
node: ?MatchAsPattern,
|
|
879
|
+
newProps: Partial<MatchAsPatternProps>,
|
|
880
|
+
) => void;
|
|
881
|
+
type MatchBindingPatternModifySignature = (
|
|
882
|
+
node: ?MatchBindingPattern,
|
|
883
|
+
newProps: Partial<MatchBindingPatternProps>,
|
|
884
|
+
) => void;
|
|
885
|
+
type MatchExpressionModifySignature = (
|
|
886
|
+
node: ?MatchExpression,
|
|
887
|
+
newProps: Partial<MatchExpressionProps>,
|
|
888
|
+
) => void;
|
|
889
|
+
type MatchExpressionCaseModifySignature = (
|
|
890
|
+
node: ?MatchExpressionCase,
|
|
891
|
+
newProps: Partial<MatchExpressionCaseProps>,
|
|
892
|
+
) => void;
|
|
893
|
+
type MatchIdentifierPatternModifySignature = (
|
|
894
|
+
node: ?MatchIdentifierPattern,
|
|
895
|
+
newProps: Partial<MatchIdentifierPatternProps>,
|
|
896
|
+
) => void;
|
|
897
|
+
type MatchLiteralPatternModifySignature = (
|
|
898
|
+
node: ?MatchLiteralPattern,
|
|
899
|
+
newProps: Partial<MatchLiteralPatternProps>,
|
|
900
|
+
) => void;
|
|
901
|
+
type MatchMemberPatternModifySignature = (
|
|
902
|
+
node: ?MatchMemberPattern,
|
|
903
|
+
newProps: Partial<MatchMemberPatternProps>,
|
|
904
|
+
) => void;
|
|
905
|
+
type MatchObjectPatternModifySignature = (
|
|
906
|
+
node: ?MatchObjectPattern,
|
|
907
|
+
newProps: Partial<MatchObjectPatternProps>,
|
|
908
|
+
) => void;
|
|
909
|
+
type MatchObjectPatternPropertyModifySignature = (
|
|
910
|
+
node: ?MatchObjectPatternProperty,
|
|
911
|
+
newProps: Partial<MatchObjectPatternPropertyProps>,
|
|
912
|
+
) => void;
|
|
913
|
+
type MatchOrPatternModifySignature = (
|
|
914
|
+
node: ?MatchOrPattern,
|
|
915
|
+
newProps: Partial<MatchOrPatternProps>,
|
|
916
|
+
) => void;
|
|
917
|
+
type MatchRestPatternModifySignature = (
|
|
918
|
+
node: ?MatchRestPattern,
|
|
919
|
+
newProps: Partial<MatchRestPatternProps>,
|
|
920
|
+
) => void;
|
|
921
|
+
type MatchStatementModifySignature = (
|
|
922
|
+
node: ?MatchStatement,
|
|
923
|
+
newProps: Partial<MatchStatementProps>,
|
|
924
|
+
) => void;
|
|
925
|
+
type MatchStatementCaseModifySignature = (
|
|
926
|
+
node: ?MatchStatementCase,
|
|
927
|
+
newProps: Partial<MatchStatementCaseProps>,
|
|
928
|
+
) => void;
|
|
929
|
+
type MatchUnaryPatternModifySignature = (
|
|
930
|
+
node: ?MatchUnaryPattern,
|
|
931
|
+
newProps: Partial<MatchUnaryPatternProps>,
|
|
932
|
+
) => void;
|
|
933
|
+
type MatchWildcardPatternModifySignature = (
|
|
934
|
+
node: ?MatchWildcardPattern,
|
|
935
|
+
newProps: Partial<MatchWildcardPatternProps>,
|
|
936
|
+
) => void;
|
|
839
937
|
type MemberExpressionModifySignature = (
|
|
840
938
|
node: ?MemberExpression,
|
|
841
939
|
newProps: Partial<MemberExpressionProps>,
|
|
@@ -968,6 +1066,10 @@ type SpreadElementModifySignature = (
|
|
|
968
1066
|
node: ?SpreadElement,
|
|
969
1067
|
newProps: Partial<SpreadElementProps>,
|
|
970
1068
|
) => void;
|
|
1069
|
+
type StaticBlockModifySignature = (
|
|
1070
|
+
node: ?StaticBlock,
|
|
1071
|
+
newProps: Partial<StaticBlockProps>,
|
|
1072
|
+
) => void;
|
|
971
1073
|
type StringLiteralModifySignature = (
|
|
972
1074
|
node: ?StringLiteral,
|
|
973
1075
|
newProps: Partial<StringLiteralProps>,
|
|
@@ -1224,6 +1326,22 @@ export type TransformModifySignatures = AnyTypeAnnotationModifySignature &
|
|
|
1224
1326
|
KeyofTypeAnnotationModifySignature &
|
|
1225
1327
|
LabeledStatementModifySignature &
|
|
1226
1328
|
LogicalExpressionModifySignature &
|
|
1329
|
+
MatchArrayPatternModifySignature &
|
|
1330
|
+
MatchAsPatternModifySignature &
|
|
1331
|
+
MatchBindingPatternModifySignature &
|
|
1332
|
+
MatchExpressionModifySignature &
|
|
1333
|
+
MatchExpressionCaseModifySignature &
|
|
1334
|
+
MatchIdentifierPatternModifySignature &
|
|
1335
|
+
MatchLiteralPatternModifySignature &
|
|
1336
|
+
MatchMemberPatternModifySignature &
|
|
1337
|
+
MatchObjectPatternModifySignature &
|
|
1338
|
+
MatchObjectPatternPropertyModifySignature &
|
|
1339
|
+
MatchOrPatternModifySignature &
|
|
1340
|
+
MatchRestPatternModifySignature &
|
|
1341
|
+
MatchStatementModifySignature &
|
|
1342
|
+
MatchStatementCaseModifySignature &
|
|
1343
|
+
MatchUnaryPatternModifySignature &
|
|
1344
|
+
MatchWildcardPatternModifySignature &
|
|
1227
1345
|
MemberExpressionModifySignature &
|
|
1228
1346
|
MetaPropertyModifySignature &
|
|
1229
1347
|
MethodDefinitionModifySignature &
|
|
@@ -1257,6 +1375,7 @@ export type TransformModifySignatures = AnyTypeAnnotationModifySignature &
|
|
|
1257
1375
|
ReturnStatementModifySignature &
|
|
1258
1376
|
SequenceExpressionModifySignature &
|
|
1259
1377
|
SpreadElementModifySignature &
|
|
1378
|
+
StaticBlockModifySignature &
|
|
1260
1379
|
StringLiteralModifySignature &
|
|
1261
1380
|
StringLiteralTypeAnnotationModifySignature &
|
|
1262
1381
|
StringTypeAnnotationModifySignature &
|
|
@@ -132,6 +132,22 @@ import type {
|
|
|
132
132
|
KeyofTypeAnnotation,
|
|
133
133
|
LabeledStatement,
|
|
134
134
|
LogicalExpression,
|
|
135
|
+
MatchArrayPattern,
|
|
136
|
+
MatchAsPattern,
|
|
137
|
+
MatchBindingPattern,
|
|
138
|
+
MatchExpression,
|
|
139
|
+
MatchExpressionCase,
|
|
140
|
+
MatchIdentifierPattern,
|
|
141
|
+
MatchLiteralPattern,
|
|
142
|
+
MatchMemberPattern,
|
|
143
|
+
MatchObjectPattern,
|
|
144
|
+
MatchObjectPatternProperty,
|
|
145
|
+
MatchOrPattern,
|
|
146
|
+
MatchRestPattern,
|
|
147
|
+
MatchStatement,
|
|
148
|
+
MatchStatementCase,
|
|
149
|
+
MatchUnaryPattern,
|
|
150
|
+
MatchWildcardPattern,
|
|
135
151
|
MemberExpression,
|
|
136
152
|
MetaProperty,
|
|
137
153
|
MethodDefinition,
|
|
@@ -162,6 +178,7 @@ import type {
|
|
|
162
178
|
ReturnStatement,
|
|
163
179
|
SequenceExpression,
|
|
164
180
|
SpreadElement,
|
|
181
|
+
StaticBlock,
|
|
165
182
|
StringLiteralTypeAnnotation,
|
|
166
183
|
StringTypeAnnotation,
|
|
167
184
|
Super,
|
|
@@ -751,6 +768,86 @@ type LogicalExpressionReplaceSignature = (
|
|
|
751
768
|
nodeToReplaceWith: DetachedNode<LogicalExpression>,
|
|
752
769
|
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
753
770
|
) => void;
|
|
771
|
+
type MatchArrayPatternReplaceSignature = (
|
|
772
|
+
target: MatchArrayPattern,
|
|
773
|
+
nodeToReplaceWith: DetachedNode<MatchArrayPattern>,
|
|
774
|
+
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
775
|
+
) => void;
|
|
776
|
+
type MatchAsPatternReplaceSignature = (
|
|
777
|
+
target: MatchAsPattern,
|
|
778
|
+
nodeToReplaceWith: DetachedNode<MatchAsPattern>,
|
|
779
|
+
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
780
|
+
) => void;
|
|
781
|
+
type MatchBindingPatternReplaceSignature = (
|
|
782
|
+
target: MatchBindingPattern,
|
|
783
|
+
nodeToReplaceWith: DetachedNode<MatchBindingPattern>,
|
|
784
|
+
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
785
|
+
) => void;
|
|
786
|
+
type MatchExpressionReplaceSignature = (
|
|
787
|
+
target: MatchExpression,
|
|
788
|
+
nodeToReplaceWith: DetachedNode<MatchExpression>,
|
|
789
|
+
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
790
|
+
) => void;
|
|
791
|
+
type MatchExpressionCaseReplaceSignature = (
|
|
792
|
+
target: MatchExpressionCase,
|
|
793
|
+
nodeToReplaceWith: DetachedNode<MatchExpressionCase>,
|
|
794
|
+
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
795
|
+
) => void;
|
|
796
|
+
type MatchIdentifierPatternReplaceSignature = (
|
|
797
|
+
target: MatchIdentifierPattern,
|
|
798
|
+
nodeToReplaceWith: DetachedNode<MatchIdentifierPattern>,
|
|
799
|
+
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
800
|
+
) => void;
|
|
801
|
+
type MatchLiteralPatternReplaceSignature = (
|
|
802
|
+
target: MatchLiteralPattern,
|
|
803
|
+
nodeToReplaceWith: DetachedNode<MatchLiteralPattern>,
|
|
804
|
+
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
805
|
+
) => void;
|
|
806
|
+
type MatchMemberPatternReplaceSignature = (
|
|
807
|
+
target: MatchMemberPattern,
|
|
808
|
+
nodeToReplaceWith: DetachedNode<MatchMemberPattern>,
|
|
809
|
+
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
810
|
+
) => void;
|
|
811
|
+
type MatchObjectPatternReplaceSignature = (
|
|
812
|
+
target: MatchObjectPattern,
|
|
813
|
+
nodeToReplaceWith: DetachedNode<MatchObjectPattern>,
|
|
814
|
+
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
815
|
+
) => void;
|
|
816
|
+
type MatchObjectPatternPropertyReplaceSignature = (
|
|
817
|
+
target: MatchObjectPatternProperty,
|
|
818
|
+
nodeToReplaceWith: DetachedNode<MatchObjectPatternProperty>,
|
|
819
|
+
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
820
|
+
) => void;
|
|
821
|
+
type MatchOrPatternReplaceSignature = (
|
|
822
|
+
target: MatchOrPattern,
|
|
823
|
+
nodeToReplaceWith: DetachedNode<MatchOrPattern>,
|
|
824
|
+
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
825
|
+
) => void;
|
|
826
|
+
type MatchRestPatternReplaceSignature = (
|
|
827
|
+
target: MatchRestPattern,
|
|
828
|
+
nodeToReplaceWith: DetachedNode<MatchRestPattern>,
|
|
829
|
+
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
830
|
+
) => void;
|
|
831
|
+
type MatchStatementReplaceSignature = (
|
|
832
|
+
target: MatchStatement,
|
|
833
|
+
nodeToReplaceWith: DetachedNode<MatchStatement>,
|
|
834
|
+
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
835
|
+
) => void;
|
|
836
|
+
type MatchStatementCaseReplaceSignature = (
|
|
837
|
+
target: MatchStatementCase,
|
|
838
|
+
nodeToReplaceWith: DetachedNode<MatchStatementCase>,
|
|
839
|
+
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
840
|
+
) => void;
|
|
841
|
+
type MatchUnaryPatternReplaceSignature = (
|
|
842
|
+
target: MatchUnaryPattern,
|
|
843
|
+
nodeToReplaceWith: DetachedNode<MatchUnaryPattern>,
|
|
844
|
+
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
845
|
+
) => void;
|
|
846
|
+
type MatchWildcardPatternReplaceSignature = (
|
|
847
|
+
target: MatchWildcardPattern,
|
|
848
|
+
nodeToReplaceWith: DetachedNode<MatchWildcardPattern>,
|
|
849
|
+
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
850
|
+
) => void;
|
|
754
851
|
type MemberExpressionReplaceSignature = (
|
|
755
852
|
target: MemberExpression,
|
|
756
853
|
nodeToReplaceWith: DetachedNode<MemberExpression>,
|
|
@@ -901,6 +998,11 @@ type SpreadElementReplaceSignature = (
|
|
|
901
998
|
nodeToReplaceWith: DetachedNode<SpreadElement>,
|
|
902
999
|
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
903
1000
|
) => void;
|
|
1001
|
+
type StaticBlockReplaceSignature = (
|
|
1002
|
+
target: StaticBlock,
|
|
1003
|
+
nodeToReplaceWith: DetachedNode<StaticBlock>,
|
|
1004
|
+
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
1005
|
+
) => void;
|
|
904
1006
|
type StringLiteralTypeAnnotationReplaceSignature = (
|
|
905
1007
|
target: StringLiteralTypeAnnotation,
|
|
906
1008
|
nodeToReplaceWith: DetachedNode<StringLiteralTypeAnnotation>,
|
|
@@ -1191,6 +1293,22 @@ export type TransformReplaceSignatures = AnyTypeAnnotationReplaceSignature &
|
|
|
1191
1293
|
KeyofTypeAnnotationReplaceSignature &
|
|
1192
1294
|
LabeledStatementReplaceSignature &
|
|
1193
1295
|
LogicalExpressionReplaceSignature &
|
|
1296
|
+
MatchArrayPatternReplaceSignature &
|
|
1297
|
+
MatchAsPatternReplaceSignature &
|
|
1298
|
+
MatchBindingPatternReplaceSignature &
|
|
1299
|
+
MatchExpressionReplaceSignature &
|
|
1300
|
+
MatchExpressionCaseReplaceSignature &
|
|
1301
|
+
MatchIdentifierPatternReplaceSignature &
|
|
1302
|
+
MatchLiteralPatternReplaceSignature &
|
|
1303
|
+
MatchMemberPatternReplaceSignature &
|
|
1304
|
+
MatchObjectPatternReplaceSignature &
|
|
1305
|
+
MatchObjectPatternPropertyReplaceSignature &
|
|
1306
|
+
MatchOrPatternReplaceSignature &
|
|
1307
|
+
MatchRestPatternReplaceSignature &
|
|
1308
|
+
MatchStatementReplaceSignature &
|
|
1309
|
+
MatchStatementCaseReplaceSignature &
|
|
1310
|
+
MatchUnaryPatternReplaceSignature &
|
|
1311
|
+
MatchWildcardPatternReplaceSignature &
|
|
1194
1312
|
MemberExpressionReplaceSignature &
|
|
1195
1313
|
MetaPropertyReplaceSignature &
|
|
1196
1314
|
MethodDefinitionReplaceSignature &
|
|
@@ -1221,6 +1339,7 @@ export type TransformReplaceSignatures = AnyTypeAnnotationReplaceSignature &
|
|
|
1221
1339
|
ReturnStatementReplaceSignature &
|
|
1222
1340
|
SequenceExpressionReplaceSignature &
|
|
1223
1341
|
SpreadElementReplaceSignature &
|
|
1342
|
+
StaticBlockReplaceSignature &
|
|
1224
1343
|
StringLiteralTypeAnnotationReplaceSignature &
|
|
1225
1344
|
StringTypeAnnotationReplaceSignature &
|
|
1226
1345
|
SuperReplaceSignature &
|
|
@@ -128,6 +128,22 @@ var _exportNames = {
|
|
|
128
128
|
KeyofTypeAnnotation: true,
|
|
129
129
|
LabeledStatement: true,
|
|
130
130
|
LogicalExpression: true,
|
|
131
|
+
MatchArrayPattern: true,
|
|
132
|
+
MatchAsPattern: true,
|
|
133
|
+
MatchBindingPattern: true,
|
|
134
|
+
MatchExpression: true,
|
|
135
|
+
MatchExpressionCase: true,
|
|
136
|
+
MatchIdentifierPattern: true,
|
|
137
|
+
MatchLiteralPattern: true,
|
|
138
|
+
MatchMemberPattern: true,
|
|
139
|
+
MatchObjectPattern: true,
|
|
140
|
+
MatchObjectPatternProperty: true,
|
|
141
|
+
MatchOrPattern: true,
|
|
142
|
+
MatchRestPattern: true,
|
|
143
|
+
MatchStatement: true,
|
|
144
|
+
MatchStatementCase: true,
|
|
145
|
+
MatchUnaryPattern: true,
|
|
146
|
+
MatchWildcardPattern: true,
|
|
131
147
|
MetaProperty: true,
|
|
132
148
|
MethodDefinition: true,
|
|
133
149
|
MixedTypeAnnotation: true,
|
|
@@ -155,6 +171,7 @@ var _exportNames = {
|
|
|
155
171
|
ReturnStatement: true,
|
|
156
172
|
SequenceExpression: true,
|
|
157
173
|
SpreadElement: true,
|
|
174
|
+
StaticBlock: true,
|
|
158
175
|
StringLiteralTypeAnnotation: true,
|
|
159
176
|
StringTypeAnnotation: true,
|
|
160
177
|
Super: true,
|
|
@@ -293,6 +310,22 @@ exports.JSXText = JSXText;
|
|
|
293
310
|
exports.KeyofTypeAnnotation = KeyofTypeAnnotation;
|
|
294
311
|
exports.LabeledStatement = LabeledStatement;
|
|
295
312
|
exports.LogicalExpression = LogicalExpression;
|
|
313
|
+
exports.MatchArrayPattern = MatchArrayPattern;
|
|
314
|
+
exports.MatchAsPattern = MatchAsPattern;
|
|
315
|
+
exports.MatchBindingPattern = MatchBindingPattern;
|
|
316
|
+
exports.MatchExpression = MatchExpression;
|
|
317
|
+
exports.MatchExpressionCase = MatchExpressionCase;
|
|
318
|
+
exports.MatchIdentifierPattern = MatchIdentifierPattern;
|
|
319
|
+
exports.MatchLiteralPattern = MatchLiteralPattern;
|
|
320
|
+
exports.MatchMemberPattern = MatchMemberPattern;
|
|
321
|
+
exports.MatchObjectPattern = MatchObjectPattern;
|
|
322
|
+
exports.MatchObjectPatternProperty = MatchObjectPatternProperty;
|
|
323
|
+
exports.MatchOrPattern = MatchOrPattern;
|
|
324
|
+
exports.MatchRestPattern = MatchRestPattern;
|
|
325
|
+
exports.MatchStatement = MatchStatement;
|
|
326
|
+
exports.MatchStatementCase = MatchStatementCase;
|
|
327
|
+
exports.MatchUnaryPattern = MatchUnaryPattern;
|
|
328
|
+
exports.MatchWildcardPattern = MatchWildcardPattern;
|
|
296
329
|
exports.MetaProperty = MetaProperty;
|
|
297
330
|
exports.MethodDefinition = MethodDefinition;
|
|
298
331
|
exports.MixedTypeAnnotation = MixedTypeAnnotation;
|
|
@@ -320,6 +353,7 @@ exports.RestElement = RestElement;
|
|
|
320
353
|
exports.ReturnStatement = ReturnStatement;
|
|
321
354
|
exports.SequenceExpression = SequenceExpression;
|
|
322
355
|
exports.SpreadElement = SpreadElement;
|
|
356
|
+
exports.StaticBlock = StaticBlock;
|
|
323
357
|
exports.StringLiteralTypeAnnotation = StringLiteralTypeAnnotation;
|
|
324
358
|
exports.StringTypeAnnotation = StringTypeAnnotation;
|
|
325
359
|
exports.Super = Super;
|
|
@@ -1413,6 +1447,162 @@ function LogicalExpression(props) {
|
|
|
1413
1447
|
return node;
|
|
1414
1448
|
}
|
|
1415
1449
|
|
|
1450
|
+
function MatchArrayPattern(props) {
|
|
1451
|
+
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1452
|
+
type: 'MatchArrayPattern',
|
|
1453
|
+
elements: props.elements.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n)),
|
|
1454
|
+
rest: (0, _detachedNode.asDetachedNodeForCodeGen)(props.rest)
|
|
1455
|
+
});
|
|
1456
|
+
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1457
|
+
return node;
|
|
1458
|
+
}
|
|
1459
|
+
|
|
1460
|
+
function MatchAsPattern(props) {
|
|
1461
|
+
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1462
|
+
type: 'MatchAsPattern',
|
|
1463
|
+
pattern: (0, _detachedNode.asDetachedNodeForCodeGen)(props.pattern),
|
|
1464
|
+
target: (0, _detachedNode.asDetachedNodeForCodeGen)(props.target)
|
|
1465
|
+
});
|
|
1466
|
+
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1467
|
+
return node;
|
|
1468
|
+
}
|
|
1469
|
+
|
|
1470
|
+
function MatchBindingPattern(props) {
|
|
1471
|
+
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1472
|
+
type: 'MatchBindingPattern',
|
|
1473
|
+
id: (0, _detachedNode.asDetachedNodeForCodeGen)(props.id),
|
|
1474
|
+
kind: props.kind
|
|
1475
|
+
});
|
|
1476
|
+
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1477
|
+
return node;
|
|
1478
|
+
}
|
|
1479
|
+
|
|
1480
|
+
function MatchExpression(props) {
|
|
1481
|
+
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1482
|
+
type: 'MatchExpression',
|
|
1483
|
+
argument: (0, _detachedNode.asDetachedNodeForCodeGen)(props.argument),
|
|
1484
|
+
cases: props.cases.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n))
|
|
1485
|
+
});
|
|
1486
|
+
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1487
|
+
return node;
|
|
1488
|
+
}
|
|
1489
|
+
|
|
1490
|
+
function MatchExpressionCase(props) {
|
|
1491
|
+
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1492
|
+
type: 'MatchExpressionCase',
|
|
1493
|
+
pattern: (0, _detachedNode.asDetachedNodeForCodeGen)(props.pattern),
|
|
1494
|
+
body: (0, _detachedNode.asDetachedNodeForCodeGen)(props.body),
|
|
1495
|
+
guard: (0, _detachedNode.asDetachedNodeForCodeGen)(props.guard)
|
|
1496
|
+
});
|
|
1497
|
+
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1498
|
+
return node;
|
|
1499
|
+
}
|
|
1500
|
+
|
|
1501
|
+
function MatchIdentifierPattern(props) {
|
|
1502
|
+
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1503
|
+
type: 'MatchIdentifierPattern',
|
|
1504
|
+
id: (0, _detachedNode.asDetachedNodeForCodeGen)(props.id)
|
|
1505
|
+
});
|
|
1506
|
+
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1507
|
+
return node;
|
|
1508
|
+
}
|
|
1509
|
+
|
|
1510
|
+
function MatchLiteralPattern(props) {
|
|
1511
|
+
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1512
|
+
type: 'MatchLiteralPattern',
|
|
1513
|
+
literal: (0, _detachedNode.asDetachedNodeForCodeGen)(props.literal)
|
|
1514
|
+
});
|
|
1515
|
+
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1516
|
+
return node;
|
|
1517
|
+
}
|
|
1518
|
+
|
|
1519
|
+
function MatchMemberPattern(props) {
|
|
1520
|
+
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1521
|
+
type: 'MatchMemberPattern',
|
|
1522
|
+
base: (0, _detachedNode.asDetachedNodeForCodeGen)(props.base),
|
|
1523
|
+
property: (0, _detachedNode.asDetachedNodeForCodeGen)(props.property)
|
|
1524
|
+
});
|
|
1525
|
+
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1526
|
+
return node;
|
|
1527
|
+
}
|
|
1528
|
+
|
|
1529
|
+
function MatchObjectPattern(props) {
|
|
1530
|
+
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1531
|
+
type: 'MatchObjectPattern',
|
|
1532
|
+
properties: props.properties.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n)),
|
|
1533
|
+
rest: (0, _detachedNode.asDetachedNodeForCodeGen)(props.rest)
|
|
1534
|
+
});
|
|
1535
|
+
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1536
|
+
return node;
|
|
1537
|
+
}
|
|
1538
|
+
|
|
1539
|
+
function MatchObjectPatternProperty(props) {
|
|
1540
|
+
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1541
|
+
type: 'MatchObjectPatternProperty',
|
|
1542
|
+
key: (0, _detachedNode.asDetachedNodeForCodeGen)(props.key),
|
|
1543
|
+
pattern: (0, _detachedNode.asDetachedNodeForCodeGen)(props.pattern),
|
|
1544
|
+
shorthand: props.shorthand
|
|
1545
|
+
});
|
|
1546
|
+
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1547
|
+
return node;
|
|
1548
|
+
}
|
|
1549
|
+
|
|
1550
|
+
function MatchOrPattern(props) {
|
|
1551
|
+
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1552
|
+
type: 'MatchOrPattern',
|
|
1553
|
+
patterns: props.patterns.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n))
|
|
1554
|
+
});
|
|
1555
|
+
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1556
|
+
return node;
|
|
1557
|
+
}
|
|
1558
|
+
|
|
1559
|
+
function MatchRestPattern(props) {
|
|
1560
|
+
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1561
|
+
type: 'MatchRestPattern',
|
|
1562
|
+
argument: (0, _detachedNode.asDetachedNodeForCodeGen)(props.argument)
|
|
1563
|
+
});
|
|
1564
|
+
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1565
|
+
return node;
|
|
1566
|
+
}
|
|
1567
|
+
|
|
1568
|
+
function MatchStatement(props) {
|
|
1569
|
+
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1570
|
+
type: 'MatchStatement',
|
|
1571
|
+
argument: (0, _detachedNode.asDetachedNodeForCodeGen)(props.argument),
|
|
1572
|
+
cases: props.cases.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n))
|
|
1573
|
+
});
|
|
1574
|
+
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1575
|
+
return node;
|
|
1576
|
+
}
|
|
1577
|
+
|
|
1578
|
+
function MatchStatementCase(props) {
|
|
1579
|
+
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1580
|
+
type: 'MatchStatementCase',
|
|
1581
|
+
pattern: (0, _detachedNode.asDetachedNodeForCodeGen)(props.pattern),
|
|
1582
|
+
body: (0, _detachedNode.asDetachedNodeForCodeGen)(props.body),
|
|
1583
|
+
guard: (0, _detachedNode.asDetachedNodeForCodeGen)(props.guard)
|
|
1584
|
+
});
|
|
1585
|
+
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1586
|
+
return node;
|
|
1587
|
+
}
|
|
1588
|
+
|
|
1589
|
+
function MatchUnaryPattern(props) {
|
|
1590
|
+
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1591
|
+
type: 'MatchUnaryPattern',
|
|
1592
|
+
argument: (0, _detachedNode.asDetachedNodeForCodeGen)(props.argument),
|
|
1593
|
+
operator: props.operator
|
|
1594
|
+
});
|
|
1595
|
+
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1596
|
+
return node;
|
|
1597
|
+
}
|
|
1598
|
+
|
|
1599
|
+
function MatchWildcardPattern(props = { ...null
|
|
1600
|
+
}) {
|
|
1601
|
+
return (0, _detachedNode.detachedProps)(props.parent, {
|
|
1602
|
+
type: 'MatchWildcardPattern'
|
|
1603
|
+
});
|
|
1604
|
+
}
|
|
1605
|
+
|
|
1416
1606
|
function MetaProperty(props) {
|
|
1417
1607
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1418
1608
|
type: 'MetaProperty',
|
|
@@ -1696,6 +1886,15 @@ function SpreadElement(props) {
|
|
|
1696
1886
|
return node;
|
|
1697
1887
|
}
|
|
1698
1888
|
|
|
1889
|
+
function StaticBlock(props) {
|
|
1890
|
+
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1891
|
+
type: 'StaticBlock',
|
|
1892
|
+
body: props.body.map(n => (0, _detachedNode.asDetachedNodeForCodeGen)(n))
|
|
1893
|
+
});
|
|
1894
|
+
(0, _detachedNode.setParentPointersInDirectChildren)(node);
|
|
1895
|
+
return node;
|
|
1896
|
+
}
|
|
1897
|
+
|
|
1699
1898
|
function StringLiteralTypeAnnotation(props) {
|
|
1700
1899
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1701
1900
|
type: 'StringLiteralTypeAnnotation',
|
|
@@ -1887,6 +2086,7 @@ function TypeParameter(props) {
|
|
|
1887
2086
|
const node = (0, _detachedNode.detachedProps)(props.parent, {
|
|
1888
2087
|
type: 'TypeParameter',
|
|
1889
2088
|
name: props.name,
|
|
2089
|
+
const: props.const,
|
|
1890
2090
|
bound: (0, _detachedNode.asDetachedNodeForCodeGen)(props.bound),
|
|
1891
2091
|
variance: (0, _detachedNode.asDetachedNodeForCodeGen)(props.variance),
|
|
1892
2092
|
default: (0, _detachedNode.asDetachedNodeForCodeGen)(props.default),
|
|
@@ -126,6 +126,22 @@ import type {
|
|
|
126
126
|
KeyofTypeAnnotation as KeyofTypeAnnotationType,
|
|
127
127
|
LabeledStatement as LabeledStatementType,
|
|
128
128
|
LogicalExpression as LogicalExpressionType,
|
|
129
|
+
MatchArrayPattern as MatchArrayPatternType,
|
|
130
|
+
MatchAsPattern as MatchAsPatternType,
|
|
131
|
+
MatchBindingPattern as MatchBindingPatternType,
|
|
132
|
+
MatchExpression as MatchExpressionType,
|
|
133
|
+
MatchExpressionCase as MatchExpressionCaseType,
|
|
134
|
+
MatchIdentifierPattern as MatchIdentifierPatternType,
|
|
135
|
+
MatchLiteralPattern as MatchLiteralPatternType,
|
|
136
|
+
MatchMemberPattern as MatchMemberPatternType,
|
|
137
|
+
MatchObjectPattern as MatchObjectPatternType,
|
|
138
|
+
MatchObjectPatternProperty as MatchObjectPatternPropertyType,
|
|
139
|
+
MatchOrPattern as MatchOrPatternType,
|
|
140
|
+
MatchRestPattern as MatchRestPatternType,
|
|
141
|
+
MatchStatement as MatchStatementType,
|
|
142
|
+
MatchStatementCase as MatchStatementCaseType,
|
|
143
|
+
MatchUnaryPattern as MatchUnaryPatternType,
|
|
144
|
+
MatchWildcardPattern as MatchWildcardPatternType,
|
|
129
145
|
MetaProperty as MetaPropertyType,
|
|
130
146
|
MethodDefinition as MethodDefinitionType,
|
|
131
147
|
MixedTypeAnnotation as MixedTypeAnnotationType,
|
|
@@ -153,6 +169,7 @@ import type {
|
|
|
153
169
|
ReturnStatement as ReturnStatementType,
|
|
154
170
|
SequenceExpression as SequenceExpressionType,
|
|
155
171
|
SpreadElement as SpreadElementType,
|
|
172
|
+
StaticBlock as StaticBlockType,
|
|
156
173
|
StringLiteralTypeAnnotation as StringLiteralTypeAnnotationType,
|
|
157
174
|
StringTypeAnnotation as StringTypeAnnotationType,
|
|
158
175
|
Super as SuperType,
|
|
@@ -808,6 +825,92 @@ export type LogicalExpressionProps = {
|
|
|
808
825
|
+operator: LogicalExpressionType['operator'],
|
|
809
826
|
};
|
|
810
827
|
|
|
828
|
+
export type MatchArrayPatternProps = {
|
|
829
|
+
+elements: $ReadOnlyArray<
|
|
830
|
+
MaybeDetachedNode<MatchArrayPatternType['elements'][number]>,
|
|
831
|
+
>,
|
|
832
|
+
+rest?: ?MaybeDetachedNode<MatchArrayPatternType['rest']>,
|
|
833
|
+
};
|
|
834
|
+
|
|
835
|
+
export type MatchAsPatternProps = {
|
|
836
|
+
+pattern: MaybeDetachedNode<MatchAsPatternType['pattern']>,
|
|
837
|
+
+target: MaybeDetachedNode<MatchAsPatternType['target']>,
|
|
838
|
+
};
|
|
839
|
+
|
|
840
|
+
export type MatchBindingPatternProps = {
|
|
841
|
+
+id: MaybeDetachedNode<MatchBindingPatternType['id']>,
|
|
842
|
+
+kind: MatchBindingPatternType['kind'],
|
|
843
|
+
};
|
|
844
|
+
|
|
845
|
+
export type MatchExpressionProps = {
|
|
846
|
+
+argument: MaybeDetachedNode<MatchExpressionType['argument']>,
|
|
847
|
+
+cases: $ReadOnlyArray<
|
|
848
|
+
MaybeDetachedNode<MatchExpressionType['cases'][number]>,
|
|
849
|
+
>,
|
|
850
|
+
};
|
|
851
|
+
|
|
852
|
+
export type MatchExpressionCaseProps = {
|
|
853
|
+
+pattern: MaybeDetachedNode<MatchExpressionCaseType['pattern']>,
|
|
854
|
+
+body: MaybeDetachedNode<MatchExpressionCaseType['body']>,
|
|
855
|
+
+guard?: ?MaybeDetachedNode<MatchExpressionCaseType['guard']>,
|
|
856
|
+
};
|
|
857
|
+
|
|
858
|
+
export type MatchIdentifierPatternProps = {
|
|
859
|
+
+id: MaybeDetachedNode<MatchIdentifierPatternType['id']>,
|
|
860
|
+
};
|
|
861
|
+
|
|
862
|
+
export type MatchLiteralPatternProps = {
|
|
863
|
+
+literal: MaybeDetachedNode<MatchLiteralPatternType['literal']>,
|
|
864
|
+
};
|
|
865
|
+
|
|
866
|
+
export type MatchMemberPatternProps = {
|
|
867
|
+
+base: MaybeDetachedNode<MatchMemberPatternType['base']>,
|
|
868
|
+
+property: MaybeDetachedNode<MatchMemberPatternType['property']>,
|
|
869
|
+
};
|
|
870
|
+
|
|
871
|
+
export type MatchObjectPatternProps = {
|
|
872
|
+
+properties: $ReadOnlyArray<
|
|
873
|
+
MaybeDetachedNode<MatchObjectPatternType['properties'][number]>,
|
|
874
|
+
>,
|
|
875
|
+
+rest?: ?MaybeDetachedNode<MatchObjectPatternType['rest']>,
|
|
876
|
+
};
|
|
877
|
+
|
|
878
|
+
export type MatchObjectPatternPropertyProps = {
|
|
879
|
+
+key: MaybeDetachedNode<MatchObjectPatternPropertyType['key']>,
|
|
880
|
+
+pattern: MaybeDetachedNode<MatchObjectPatternPropertyType['pattern']>,
|
|
881
|
+
+shorthand: MatchObjectPatternPropertyType['shorthand'],
|
|
882
|
+
};
|
|
883
|
+
|
|
884
|
+
export type MatchOrPatternProps = {
|
|
885
|
+
+patterns: $ReadOnlyArray<
|
|
886
|
+
MaybeDetachedNode<MatchOrPatternType['patterns'][number]>,
|
|
887
|
+
>,
|
|
888
|
+
};
|
|
889
|
+
|
|
890
|
+
export type MatchRestPatternProps = {
|
|
891
|
+
+argument?: ?MaybeDetachedNode<MatchRestPatternType['argument']>,
|
|
892
|
+
};
|
|
893
|
+
|
|
894
|
+
export type MatchStatementProps = {
|
|
895
|
+
+argument: MaybeDetachedNode<MatchStatementType['argument']>,
|
|
896
|
+
+cases: $ReadOnlyArray<
|
|
897
|
+
MaybeDetachedNode<MatchStatementType['cases'][number]>,
|
|
898
|
+
>,
|
|
899
|
+
};
|
|
900
|
+
|
|
901
|
+
export type MatchStatementCaseProps = {
|
|
902
|
+
+pattern: MaybeDetachedNode<MatchStatementCaseType['pattern']>,
|
|
903
|
+
+body: MaybeDetachedNode<MatchStatementCaseType['body']>,
|
|
904
|
+
+guard?: ?MaybeDetachedNode<MatchStatementCaseType['guard']>,
|
|
905
|
+
};
|
|
906
|
+
|
|
907
|
+
export type MatchUnaryPatternProps = {
|
|
908
|
+
+argument: MaybeDetachedNode<MatchUnaryPatternType['argument']>,
|
|
909
|
+
+operator: MatchUnaryPatternType['operator'],
|
|
910
|
+
};
|
|
911
|
+
|
|
912
|
+
export type MatchWildcardPatternProps = {};
|
|
913
|
+
|
|
811
914
|
export type MetaPropertyProps = {
|
|
812
915
|
+meta: MaybeDetachedNode<MetaPropertyType['meta']>,
|
|
813
916
|
+property: MaybeDetachedNode<MetaPropertyType['property']>,
|
|
@@ -982,6 +1085,10 @@ export type SpreadElementProps = {
|
|
|
982
1085
|
+argument: MaybeDetachedNode<SpreadElementType['argument']>,
|
|
983
1086
|
};
|
|
984
1087
|
|
|
1088
|
+
export type StaticBlockProps = {
|
|
1089
|
+
+body: $ReadOnlyArray<MaybeDetachedNode<StaticBlockType['body'][number]>>,
|
|
1090
|
+
};
|
|
1091
|
+
|
|
985
1092
|
export type StringLiteralTypeAnnotationProps = {
|
|
986
1093
|
+value: StringLiteralTypeAnnotationType['value'],
|
|
987
1094
|
+raw: StringLiteralTypeAnnotationType['raw'],
|
|
@@ -1085,6 +1192,7 @@ export type TypeOperatorProps = {
|
|
|
1085
1192
|
|
|
1086
1193
|
export type TypeParameterProps = {
|
|
1087
1194
|
+name: TypeParameterType['name'],
|
|
1195
|
+
+const: TypeParameterType['const'],
|
|
1088
1196
|
+bound?: ?MaybeDetachedNode<TypeParameterType['bound']>,
|
|
1089
1197
|
+variance?: ?MaybeDetachedNode<TypeParameterType['variance']>,
|
|
1090
1198
|
+default?: ?MaybeDetachedNode<TypeParameterType['default']>,
|
|
@@ -2646,6 +2754,240 @@ export function LogicalExpression(props: {
|
|
|
2646
2754
|
return node;
|
|
2647
2755
|
}
|
|
2648
2756
|
|
|
2757
|
+
export function MatchArrayPattern(props: {
|
|
2758
|
+
...MatchArrayPatternProps,
|
|
2759
|
+
+parent?: ESNode,
|
|
2760
|
+
}): DetachedNode<MatchArrayPatternType> {
|
|
2761
|
+
const node = detachedProps<MatchArrayPatternType>(
|
|
2762
|
+
(props.parent: $FlowFixMe),
|
|
2763
|
+
{
|
|
2764
|
+
type: 'MatchArrayPattern',
|
|
2765
|
+
elements: props.elements.map(n => asDetachedNodeForCodeGen(n)),
|
|
2766
|
+
rest: asDetachedNodeForCodeGen(props.rest),
|
|
2767
|
+
},
|
|
2768
|
+
);
|
|
2769
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2770
|
+
return node;
|
|
2771
|
+
}
|
|
2772
|
+
|
|
2773
|
+
export function MatchAsPattern(props: {
|
|
2774
|
+
...MatchAsPatternProps,
|
|
2775
|
+
+parent?: ESNode,
|
|
2776
|
+
}): DetachedNode<MatchAsPatternType> {
|
|
2777
|
+
const node = detachedProps<MatchAsPatternType>((props.parent: $FlowFixMe), {
|
|
2778
|
+
type: 'MatchAsPattern',
|
|
2779
|
+
pattern: asDetachedNodeForCodeGen(props.pattern),
|
|
2780
|
+
target: asDetachedNodeForCodeGen(props.target),
|
|
2781
|
+
});
|
|
2782
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2783
|
+
return node;
|
|
2784
|
+
}
|
|
2785
|
+
|
|
2786
|
+
export function MatchBindingPattern(props: {
|
|
2787
|
+
...MatchBindingPatternProps,
|
|
2788
|
+
+parent?: ESNode,
|
|
2789
|
+
}): DetachedNode<MatchBindingPatternType> {
|
|
2790
|
+
const node = detachedProps<MatchBindingPatternType>(
|
|
2791
|
+
(props.parent: $FlowFixMe),
|
|
2792
|
+
{
|
|
2793
|
+
type: 'MatchBindingPattern',
|
|
2794
|
+
id: asDetachedNodeForCodeGen(props.id),
|
|
2795
|
+
kind: props.kind,
|
|
2796
|
+
},
|
|
2797
|
+
);
|
|
2798
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2799
|
+
return node;
|
|
2800
|
+
}
|
|
2801
|
+
|
|
2802
|
+
export function MatchExpression(props: {
|
|
2803
|
+
...MatchExpressionProps,
|
|
2804
|
+
+parent?: ESNode,
|
|
2805
|
+
}): DetachedNode<MatchExpressionType> {
|
|
2806
|
+
const node = detachedProps<MatchExpressionType>((props.parent: $FlowFixMe), {
|
|
2807
|
+
type: 'MatchExpression',
|
|
2808
|
+
argument: asDetachedNodeForCodeGen(props.argument),
|
|
2809
|
+
cases: props.cases.map(n => asDetachedNodeForCodeGen(n)),
|
|
2810
|
+
});
|
|
2811
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2812
|
+
return node;
|
|
2813
|
+
}
|
|
2814
|
+
|
|
2815
|
+
export function MatchExpressionCase(props: {
|
|
2816
|
+
...MatchExpressionCaseProps,
|
|
2817
|
+
+parent?: ESNode,
|
|
2818
|
+
}): DetachedNode<MatchExpressionCaseType> {
|
|
2819
|
+
const node = detachedProps<MatchExpressionCaseType>(
|
|
2820
|
+
(props.parent: $FlowFixMe),
|
|
2821
|
+
{
|
|
2822
|
+
type: 'MatchExpressionCase',
|
|
2823
|
+
pattern: asDetachedNodeForCodeGen(props.pattern),
|
|
2824
|
+
body: asDetachedNodeForCodeGen(props.body),
|
|
2825
|
+
guard: asDetachedNodeForCodeGen(props.guard),
|
|
2826
|
+
},
|
|
2827
|
+
);
|
|
2828
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2829
|
+
return node;
|
|
2830
|
+
}
|
|
2831
|
+
|
|
2832
|
+
export function MatchIdentifierPattern(props: {
|
|
2833
|
+
...MatchIdentifierPatternProps,
|
|
2834
|
+
+parent?: ESNode,
|
|
2835
|
+
}): DetachedNode<MatchIdentifierPatternType> {
|
|
2836
|
+
const node = detachedProps<MatchIdentifierPatternType>(
|
|
2837
|
+
(props.parent: $FlowFixMe),
|
|
2838
|
+
{
|
|
2839
|
+
type: 'MatchIdentifierPattern',
|
|
2840
|
+
id: asDetachedNodeForCodeGen(props.id),
|
|
2841
|
+
},
|
|
2842
|
+
);
|
|
2843
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2844
|
+
return node;
|
|
2845
|
+
}
|
|
2846
|
+
|
|
2847
|
+
export function MatchLiteralPattern(props: {
|
|
2848
|
+
...MatchLiteralPatternProps,
|
|
2849
|
+
+parent?: ESNode,
|
|
2850
|
+
}): DetachedNode<MatchLiteralPatternType> {
|
|
2851
|
+
const node = detachedProps<MatchLiteralPatternType>(
|
|
2852
|
+
(props.parent: $FlowFixMe),
|
|
2853
|
+
{
|
|
2854
|
+
type: 'MatchLiteralPattern',
|
|
2855
|
+
literal: asDetachedNodeForCodeGen(props.literal),
|
|
2856
|
+
},
|
|
2857
|
+
);
|
|
2858
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2859
|
+
return node;
|
|
2860
|
+
}
|
|
2861
|
+
|
|
2862
|
+
export function MatchMemberPattern(props: {
|
|
2863
|
+
...MatchMemberPatternProps,
|
|
2864
|
+
+parent?: ESNode,
|
|
2865
|
+
}): DetachedNode<MatchMemberPatternType> {
|
|
2866
|
+
const node = detachedProps<MatchMemberPatternType>(
|
|
2867
|
+
(props.parent: $FlowFixMe),
|
|
2868
|
+
{
|
|
2869
|
+
type: 'MatchMemberPattern',
|
|
2870
|
+
base: asDetachedNodeForCodeGen(props.base),
|
|
2871
|
+
property: asDetachedNodeForCodeGen(props.property),
|
|
2872
|
+
},
|
|
2873
|
+
);
|
|
2874
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2875
|
+
return node;
|
|
2876
|
+
}
|
|
2877
|
+
|
|
2878
|
+
export function MatchObjectPattern(props: {
|
|
2879
|
+
...MatchObjectPatternProps,
|
|
2880
|
+
+parent?: ESNode,
|
|
2881
|
+
}): DetachedNode<MatchObjectPatternType> {
|
|
2882
|
+
const node = detachedProps<MatchObjectPatternType>(
|
|
2883
|
+
(props.parent: $FlowFixMe),
|
|
2884
|
+
{
|
|
2885
|
+
type: 'MatchObjectPattern',
|
|
2886
|
+
properties: props.properties.map(n => asDetachedNodeForCodeGen(n)),
|
|
2887
|
+
rest: asDetachedNodeForCodeGen(props.rest),
|
|
2888
|
+
},
|
|
2889
|
+
);
|
|
2890
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2891
|
+
return node;
|
|
2892
|
+
}
|
|
2893
|
+
|
|
2894
|
+
export function MatchObjectPatternProperty(props: {
|
|
2895
|
+
...MatchObjectPatternPropertyProps,
|
|
2896
|
+
+parent?: ESNode,
|
|
2897
|
+
}): DetachedNode<MatchObjectPatternPropertyType> {
|
|
2898
|
+
const node = detachedProps<MatchObjectPatternPropertyType>(
|
|
2899
|
+
(props.parent: $FlowFixMe),
|
|
2900
|
+
{
|
|
2901
|
+
type: 'MatchObjectPatternProperty',
|
|
2902
|
+
key: asDetachedNodeForCodeGen(props.key),
|
|
2903
|
+
pattern: asDetachedNodeForCodeGen(props.pattern),
|
|
2904
|
+
shorthand: props.shorthand,
|
|
2905
|
+
},
|
|
2906
|
+
);
|
|
2907
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2908
|
+
return node;
|
|
2909
|
+
}
|
|
2910
|
+
|
|
2911
|
+
export function MatchOrPattern(props: {
|
|
2912
|
+
...MatchOrPatternProps,
|
|
2913
|
+
+parent?: ESNode,
|
|
2914
|
+
}): DetachedNode<MatchOrPatternType> {
|
|
2915
|
+
const node = detachedProps<MatchOrPatternType>((props.parent: $FlowFixMe), {
|
|
2916
|
+
type: 'MatchOrPattern',
|
|
2917
|
+
patterns: props.patterns.map(n => asDetachedNodeForCodeGen(n)),
|
|
2918
|
+
});
|
|
2919
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2920
|
+
return node;
|
|
2921
|
+
}
|
|
2922
|
+
|
|
2923
|
+
export function MatchRestPattern(props: {
|
|
2924
|
+
...MatchRestPatternProps,
|
|
2925
|
+
+parent?: ESNode,
|
|
2926
|
+
}): DetachedNode<MatchRestPatternType> {
|
|
2927
|
+
const node = detachedProps<MatchRestPatternType>((props.parent: $FlowFixMe), {
|
|
2928
|
+
type: 'MatchRestPattern',
|
|
2929
|
+
argument: asDetachedNodeForCodeGen(props.argument),
|
|
2930
|
+
});
|
|
2931
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2932
|
+
return node;
|
|
2933
|
+
}
|
|
2934
|
+
|
|
2935
|
+
export function MatchStatement(props: {
|
|
2936
|
+
...MatchStatementProps,
|
|
2937
|
+
+parent?: ESNode,
|
|
2938
|
+
}): DetachedNode<MatchStatementType> {
|
|
2939
|
+
const node = detachedProps<MatchStatementType>((props.parent: $FlowFixMe), {
|
|
2940
|
+
type: 'MatchStatement',
|
|
2941
|
+
argument: asDetachedNodeForCodeGen(props.argument),
|
|
2942
|
+
cases: props.cases.map(n => asDetachedNodeForCodeGen(n)),
|
|
2943
|
+
});
|
|
2944
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2945
|
+
return node;
|
|
2946
|
+
}
|
|
2947
|
+
|
|
2948
|
+
export function MatchStatementCase(props: {
|
|
2949
|
+
...MatchStatementCaseProps,
|
|
2950
|
+
+parent?: ESNode,
|
|
2951
|
+
}): DetachedNode<MatchStatementCaseType> {
|
|
2952
|
+
const node = detachedProps<MatchStatementCaseType>(
|
|
2953
|
+
(props.parent: $FlowFixMe),
|
|
2954
|
+
{
|
|
2955
|
+
type: 'MatchStatementCase',
|
|
2956
|
+
pattern: asDetachedNodeForCodeGen(props.pattern),
|
|
2957
|
+
body: asDetachedNodeForCodeGen(props.body),
|
|
2958
|
+
guard: asDetachedNodeForCodeGen(props.guard),
|
|
2959
|
+
},
|
|
2960
|
+
);
|
|
2961
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2962
|
+
return node;
|
|
2963
|
+
}
|
|
2964
|
+
|
|
2965
|
+
export function MatchUnaryPattern(props: {
|
|
2966
|
+
...MatchUnaryPatternProps,
|
|
2967
|
+
+parent?: ESNode,
|
|
2968
|
+
}): DetachedNode<MatchUnaryPatternType> {
|
|
2969
|
+
const node = detachedProps<MatchUnaryPatternType>(
|
|
2970
|
+
(props.parent: $FlowFixMe),
|
|
2971
|
+
{
|
|
2972
|
+
type: 'MatchUnaryPattern',
|
|
2973
|
+
argument: asDetachedNodeForCodeGen(props.argument),
|
|
2974
|
+
operator: props.operator,
|
|
2975
|
+
},
|
|
2976
|
+
);
|
|
2977
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
2978
|
+
return node;
|
|
2979
|
+
}
|
|
2980
|
+
|
|
2981
|
+
export function MatchWildcardPattern(
|
|
2982
|
+
props: {
|
|
2983
|
+
+parent?: ESNode,
|
|
2984
|
+
} = {...null},
|
|
2985
|
+
): DetachedNode<MatchWildcardPatternType> {
|
|
2986
|
+
return detachedProps<MatchWildcardPatternType>((props.parent: $FlowFixMe), {
|
|
2987
|
+
type: 'MatchWildcardPattern',
|
|
2988
|
+
});
|
|
2989
|
+
}
|
|
2990
|
+
|
|
2649
2991
|
export function MetaProperty(props: {
|
|
2650
2992
|
...MetaPropertyProps,
|
|
2651
2993
|
+parent?: ESNode,
|
|
@@ -3057,6 +3399,18 @@ export function SpreadElement(props: {
|
|
|
3057
3399
|
return node;
|
|
3058
3400
|
}
|
|
3059
3401
|
|
|
3402
|
+
export function StaticBlock(props: {
|
|
3403
|
+
...StaticBlockProps,
|
|
3404
|
+
+parent?: ESNode,
|
|
3405
|
+
}): DetachedNode<StaticBlockType> {
|
|
3406
|
+
const node = detachedProps<StaticBlockType>((props.parent: $FlowFixMe), {
|
|
3407
|
+
type: 'StaticBlock',
|
|
3408
|
+
body: props.body.map(n => asDetachedNodeForCodeGen(n)),
|
|
3409
|
+
});
|
|
3410
|
+
setParentPointersInDirectChildren((node: $FlowFixMe));
|
|
3411
|
+
return node;
|
|
3412
|
+
}
|
|
3413
|
+
|
|
3060
3414
|
export function StringLiteralTypeAnnotation(props: {
|
|
3061
3415
|
...StringLiteralTypeAnnotationProps,
|
|
3062
3416
|
+parent?: ESNode,
|
|
@@ -3332,6 +3686,7 @@ export function TypeParameter(props: {
|
|
|
3332
3686
|
const node = detachedProps<TypeParameterType>((props.parent: $FlowFixMe), {
|
|
3333
3687
|
type: 'TypeParameter',
|
|
3334
3688
|
name: props.name,
|
|
3689
|
+
const: props.const,
|
|
3335
3690
|
bound: asDetachedNodeForCodeGen(props.bound),
|
|
3336
3691
|
variance: asDetachedNodeForCodeGen(props.variance),
|
|
3337
3692
|
default: asDetachedNodeForCodeGen(props.default),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hermes-transform",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.0",
|
|
4
4
|
"description": "Tools built on top of Hermes-ESTree to enable codebase transformation",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -12,14 +12,14 @@
|
|
|
12
12
|
"@babel/code-frame": "^7.16.0",
|
|
13
13
|
"esquery": "^1.4.0",
|
|
14
14
|
"flow-enums-runtime": "^0.0.6",
|
|
15
|
-
"hermes-eslint": "0.
|
|
16
|
-
"hermes-estree": "0.
|
|
17
|
-
"hermes-parser": "0.
|
|
15
|
+
"hermes-eslint": "0.26.0",
|
|
16
|
+
"hermes-estree": "0.26.0",
|
|
17
|
+
"hermes-parser": "0.26.0",
|
|
18
18
|
"string-width": "4.2.3"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
21
|
"prettier": "^3.0.0 || ^2.7.1",
|
|
22
|
-
"prettier-plugin-hermes-parser": "0.
|
|
22
|
+
"prettier-plugin-hermes-parser": "0.26.0"
|
|
23
23
|
},
|
|
24
24
|
"files": [
|
|
25
25
|
"dist",
|