hermes-transform 0.32.0 → 0.33.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 +132 -0
- package/dist/generated/TransformModifySignatures.js.flow +84 -0
- package/dist/generated/TransformReplaceSignatures.js.flow +84 -0
- package/dist/generated/node-types.js +140 -2
- package/dist/generated/node-types.js.flow +269 -6
- package/dist/generated/special-case-node-types/misc.js +1 -1
- package/dist/generated/special-case-node-types/misc.js.flow +3 -3
- package/dist/src/generated/node-types.js +140 -2
- package/dist/src/generated/special-case-node-types/misc.js +1 -1
- package/dist/src/transform/comments/comments.js +7 -4
- package/dist/src/transform/mutations/ModifyNodeInPlace.js +1 -0
- package/dist/src/transform/mutations/RemoveNode.js +3 -1
- package/dist/src/transform/mutations/ReplaceNode.js +1 -0
- package/dist/src/transform/mutations/utils/getStatementParent.js +3 -1
- package/dist/transform/comments/comments.js +7 -4
- package/dist/transform/comments/comments.js.flow +7 -4
- package/dist/transform/mutations/ModifyNodeInPlace.js +1 -0
- package/dist/transform/mutations/ModifyNodeInPlace.js.flow +1 -0
- package/dist/transform/mutations/RemoveNode.js +3 -1
- package/dist/transform/mutations/RemoveNode.js.flow +3 -0
- package/dist/transform/mutations/ReplaceNode.js +1 -0
- package/dist/transform/mutations/ReplaceNode.js.flow +1 -0
- package/dist/transform/mutations/utils/getStatementParent.js +3 -1
- package/dist/transform/mutations/utils/getStatementParent.js.flow +2 -0
- package/package.json +4 -4
|
@@ -140,6 +140,8 @@ import type {
|
|
|
140
140
|
MatchExpression,
|
|
141
141
|
MatchExpressionCase,
|
|
142
142
|
MatchIdentifierPattern,
|
|
143
|
+
MatchInstanceObjectPattern,
|
|
144
|
+
MatchInstancePattern,
|
|
143
145
|
MatchLiteralPattern,
|
|
144
146
|
MatchMemberPattern,
|
|
145
147
|
MatchObjectPattern,
|
|
@@ -154,6 +156,7 @@ import type {
|
|
|
154
156
|
MetaProperty,
|
|
155
157
|
MethodDefinition,
|
|
156
158
|
MixedTypeAnnotation,
|
|
159
|
+
NeverTypeAnnotation,
|
|
157
160
|
NewExpression,
|
|
158
161
|
NullableTypeAnnotation,
|
|
159
162
|
NullLiteral,
|
|
@@ -178,6 +181,13 @@ import type {
|
|
|
178
181
|
PropertyDefinition,
|
|
179
182
|
QualifiedTypeIdentifier,
|
|
180
183
|
QualifiedTypeofIdentifier,
|
|
184
|
+
RecordDeclaration,
|
|
185
|
+
RecordDeclarationBody,
|
|
186
|
+
RecordDeclarationImplements,
|
|
187
|
+
RecordDeclarationProperty,
|
|
188
|
+
RecordDeclarationStaticProperty,
|
|
189
|
+
RecordExpression,
|
|
190
|
+
RecordExpressionProperties,
|
|
181
191
|
RegExpLiteral,
|
|
182
192
|
RestElement,
|
|
183
193
|
ReturnStatement,
|
|
@@ -211,7 +221,9 @@ import type {
|
|
|
211
221
|
TypeParameterInstantiation,
|
|
212
222
|
TypePredicate,
|
|
213
223
|
UnaryExpression,
|
|
224
|
+
UndefinedTypeAnnotation,
|
|
214
225
|
UnionTypeAnnotation,
|
|
226
|
+
UnknownTypeAnnotation,
|
|
215
227
|
UpdateExpression,
|
|
216
228
|
VariableDeclaration,
|
|
217
229
|
VariableDeclarator,
|
|
@@ -340,6 +352,8 @@ import type {
|
|
|
340
352
|
MatchExpressionProps,
|
|
341
353
|
MatchExpressionCaseProps,
|
|
342
354
|
MatchIdentifierPatternProps,
|
|
355
|
+
MatchInstanceObjectPatternProps,
|
|
356
|
+
MatchInstancePatternProps,
|
|
343
357
|
MatchLiteralPatternProps,
|
|
344
358
|
MatchMemberPatternProps,
|
|
345
359
|
MatchObjectPatternProps,
|
|
@@ -354,6 +368,7 @@ import type {
|
|
|
354
368
|
MetaPropertyProps,
|
|
355
369
|
MethodDefinitionProps,
|
|
356
370
|
MixedTypeAnnotationProps,
|
|
371
|
+
NeverTypeAnnotationProps,
|
|
357
372
|
NewExpressionProps,
|
|
358
373
|
NullableTypeAnnotationProps,
|
|
359
374
|
NullLiteralProps,
|
|
@@ -378,6 +393,13 @@ import type {
|
|
|
378
393
|
PropertyDefinitionProps,
|
|
379
394
|
QualifiedTypeIdentifierProps,
|
|
380
395
|
QualifiedTypeofIdentifierProps,
|
|
396
|
+
RecordDeclarationProps,
|
|
397
|
+
RecordDeclarationBodyProps,
|
|
398
|
+
RecordDeclarationImplementsProps,
|
|
399
|
+
RecordDeclarationPropertyProps,
|
|
400
|
+
RecordDeclarationStaticPropertyProps,
|
|
401
|
+
RecordExpressionProps,
|
|
402
|
+
RecordExpressionPropertiesProps,
|
|
381
403
|
RegExpLiteralProps,
|
|
382
404
|
RestElementProps,
|
|
383
405
|
ReturnStatementProps,
|
|
@@ -411,7 +433,9 @@ import type {
|
|
|
411
433
|
TypeParameterInstantiationProps,
|
|
412
434
|
TypePredicateProps,
|
|
413
435
|
UnaryExpressionProps,
|
|
436
|
+
UndefinedTypeAnnotationProps,
|
|
414
437
|
UnionTypeAnnotationProps,
|
|
438
|
+
UnknownTypeAnnotationProps,
|
|
415
439
|
UpdateExpressionProps,
|
|
416
440
|
VariableDeclarationProps,
|
|
417
441
|
VariableDeclaratorProps,
|
|
@@ -1367,6 +1391,22 @@ type MatchIdentifierPatternCloneSignature = ((
|
|
|
1367
1391
|
node: ?MatchIdentifierPattern,
|
|
1368
1392
|
newProps: Partial<MatchIdentifierPatternProps>,
|
|
1369
1393
|
) => DetachedNode<MatchIdentifierPattern> | null);
|
|
1394
|
+
type MatchInstanceObjectPatternCloneSignature = ((
|
|
1395
|
+
node: MatchInstanceObjectPattern,
|
|
1396
|
+
newProps: Partial<MatchInstanceObjectPatternProps>,
|
|
1397
|
+
) => DetachedNode<MatchInstanceObjectPattern>) &
|
|
1398
|
+
((
|
|
1399
|
+
node: ?MatchInstanceObjectPattern,
|
|
1400
|
+
newProps: Partial<MatchInstanceObjectPatternProps>,
|
|
1401
|
+
) => DetachedNode<MatchInstanceObjectPattern> | null);
|
|
1402
|
+
type MatchInstancePatternCloneSignature = ((
|
|
1403
|
+
node: MatchInstancePattern,
|
|
1404
|
+
newProps: Partial<MatchInstancePatternProps>,
|
|
1405
|
+
) => DetachedNode<MatchInstancePattern>) &
|
|
1406
|
+
((
|
|
1407
|
+
node: ?MatchInstancePattern,
|
|
1408
|
+
newProps: Partial<MatchInstancePatternProps>,
|
|
1409
|
+
) => DetachedNode<MatchInstancePattern> | null);
|
|
1370
1410
|
type MatchLiteralPatternCloneSignature = ((
|
|
1371
1411
|
node: MatchLiteralPattern,
|
|
1372
1412
|
newProps: Partial<MatchLiteralPatternProps>,
|
|
@@ -1479,6 +1519,14 @@ type MixedTypeAnnotationCloneSignature = ((
|
|
|
1479
1519
|
node: ?MixedTypeAnnotation,
|
|
1480
1520
|
newProps: Partial<MixedTypeAnnotationProps>,
|
|
1481
1521
|
) => DetachedNode<MixedTypeAnnotation> | null);
|
|
1522
|
+
type NeverTypeAnnotationCloneSignature = ((
|
|
1523
|
+
node: NeverTypeAnnotation,
|
|
1524
|
+
newProps: Partial<NeverTypeAnnotationProps>,
|
|
1525
|
+
) => DetachedNode<NeverTypeAnnotation>) &
|
|
1526
|
+
((
|
|
1527
|
+
node: ?NeverTypeAnnotation,
|
|
1528
|
+
newProps: Partial<NeverTypeAnnotationProps>,
|
|
1529
|
+
) => DetachedNode<NeverTypeAnnotation> | null);
|
|
1482
1530
|
type NewExpressionCloneSignature = ((
|
|
1483
1531
|
node: NewExpression,
|
|
1484
1532
|
newProps: Partial<NewExpressionProps>,
|
|
@@ -1671,6 +1719,62 @@ type QualifiedTypeofIdentifierCloneSignature = ((
|
|
|
1671
1719
|
node: ?QualifiedTypeofIdentifier,
|
|
1672
1720
|
newProps: Partial<QualifiedTypeofIdentifierProps>,
|
|
1673
1721
|
) => DetachedNode<QualifiedTypeofIdentifier> | null);
|
|
1722
|
+
type RecordDeclarationCloneSignature = ((
|
|
1723
|
+
node: RecordDeclaration,
|
|
1724
|
+
newProps: Partial<RecordDeclarationProps>,
|
|
1725
|
+
) => DetachedNode<RecordDeclaration>) &
|
|
1726
|
+
((
|
|
1727
|
+
node: ?RecordDeclaration,
|
|
1728
|
+
newProps: Partial<RecordDeclarationProps>,
|
|
1729
|
+
) => DetachedNode<RecordDeclaration> | null);
|
|
1730
|
+
type RecordDeclarationBodyCloneSignature = ((
|
|
1731
|
+
node: RecordDeclarationBody,
|
|
1732
|
+
newProps: Partial<RecordDeclarationBodyProps>,
|
|
1733
|
+
) => DetachedNode<RecordDeclarationBody>) &
|
|
1734
|
+
((
|
|
1735
|
+
node: ?RecordDeclarationBody,
|
|
1736
|
+
newProps: Partial<RecordDeclarationBodyProps>,
|
|
1737
|
+
) => DetachedNode<RecordDeclarationBody> | null);
|
|
1738
|
+
type RecordDeclarationImplementsCloneSignature = ((
|
|
1739
|
+
node: RecordDeclarationImplements,
|
|
1740
|
+
newProps: Partial<RecordDeclarationImplementsProps>,
|
|
1741
|
+
) => DetachedNode<RecordDeclarationImplements>) &
|
|
1742
|
+
((
|
|
1743
|
+
node: ?RecordDeclarationImplements,
|
|
1744
|
+
newProps: Partial<RecordDeclarationImplementsProps>,
|
|
1745
|
+
) => DetachedNode<RecordDeclarationImplements> | null);
|
|
1746
|
+
type RecordDeclarationPropertyCloneSignature = ((
|
|
1747
|
+
node: RecordDeclarationProperty,
|
|
1748
|
+
newProps: Partial<RecordDeclarationPropertyProps>,
|
|
1749
|
+
) => DetachedNode<RecordDeclarationProperty>) &
|
|
1750
|
+
((
|
|
1751
|
+
node: ?RecordDeclarationProperty,
|
|
1752
|
+
newProps: Partial<RecordDeclarationPropertyProps>,
|
|
1753
|
+
) => DetachedNode<RecordDeclarationProperty> | null);
|
|
1754
|
+
type RecordDeclarationStaticPropertyCloneSignature = ((
|
|
1755
|
+
node: RecordDeclarationStaticProperty,
|
|
1756
|
+
newProps: Partial<RecordDeclarationStaticPropertyProps>,
|
|
1757
|
+
) => DetachedNode<RecordDeclarationStaticProperty>) &
|
|
1758
|
+
((
|
|
1759
|
+
node: ?RecordDeclarationStaticProperty,
|
|
1760
|
+
newProps: Partial<RecordDeclarationStaticPropertyProps>,
|
|
1761
|
+
) => DetachedNode<RecordDeclarationStaticProperty> | null);
|
|
1762
|
+
type RecordExpressionCloneSignature = ((
|
|
1763
|
+
node: RecordExpression,
|
|
1764
|
+
newProps: Partial<RecordExpressionProps>,
|
|
1765
|
+
) => DetachedNode<RecordExpression>) &
|
|
1766
|
+
((
|
|
1767
|
+
node: ?RecordExpression,
|
|
1768
|
+
newProps: Partial<RecordExpressionProps>,
|
|
1769
|
+
) => DetachedNode<RecordExpression> | null);
|
|
1770
|
+
type RecordExpressionPropertiesCloneSignature = ((
|
|
1771
|
+
node: RecordExpressionProperties,
|
|
1772
|
+
newProps: Partial<RecordExpressionPropertiesProps>,
|
|
1773
|
+
) => DetachedNode<RecordExpressionProperties>) &
|
|
1774
|
+
((
|
|
1775
|
+
node: ?RecordExpressionProperties,
|
|
1776
|
+
newProps: Partial<RecordExpressionPropertiesProps>,
|
|
1777
|
+
) => DetachedNode<RecordExpressionProperties> | null);
|
|
1674
1778
|
type RegExpLiteralCloneSignature = ((
|
|
1675
1779
|
node: RegExpLiteral,
|
|
1676
1780
|
newProps: Partial<RegExpLiteralProps>,
|
|
@@ -1932,6 +2036,14 @@ type UnaryExpressionCloneSignature = ((
|
|
|
1932
2036
|
node: ?UnaryExpression,
|
|
1933
2037
|
newProps: Partial<UnaryExpressionProps>,
|
|
1934
2038
|
) => DetachedNode<UnaryExpression> | null);
|
|
2039
|
+
type UndefinedTypeAnnotationCloneSignature = ((
|
|
2040
|
+
node: UndefinedTypeAnnotation,
|
|
2041
|
+
newProps: Partial<UndefinedTypeAnnotationProps>,
|
|
2042
|
+
) => DetachedNode<UndefinedTypeAnnotation>) &
|
|
2043
|
+
((
|
|
2044
|
+
node: ?UndefinedTypeAnnotation,
|
|
2045
|
+
newProps: Partial<UndefinedTypeAnnotationProps>,
|
|
2046
|
+
) => DetachedNode<UndefinedTypeAnnotation> | null);
|
|
1935
2047
|
type UnionTypeAnnotationCloneSignature = ((
|
|
1936
2048
|
node: UnionTypeAnnotation,
|
|
1937
2049
|
newProps: Partial<UnionTypeAnnotationProps>,
|
|
@@ -1940,6 +2052,14 @@ type UnionTypeAnnotationCloneSignature = ((
|
|
|
1940
2052
|
node: ?UnionTypeAnnotation,
|
|
1941
2053
|
newProps: Partial<UnionTypeAnnotationProps>,
|
|
1942
2054
|
) => DetachedNode<UnionTypeAnnotation> | null);
|
|
2055
|
+
type UnknownTypeAnnotationCloneSignature = ((
|
|
2056
|
+
node: UnknownTypeAnnotation,
|
|
2057
|
+
newProps: Partial<UnknownTypeAnnotationProps>,
|
|
2058
|
+
) => DetachedNode<UnknownTypeAnnotation>) &
|
|
2059
|
+
((
|
|
2060
|
+
node: ?UnknownTypeAnnotation,
|
|
2061
|
+
newProps: Partial<UnknownTypeAnnotationProps>,
|
|
2062
|
+
) => DetachedNode<UnknownTypeAnnotation> | null);
|
|
1943
2063
|
type UpdateExpressionCloneSignature = ((
|
|
1944
2064
|
node: UpdateExpression,
|
|
1945
2065
|
newProps: Partial<UpdateExpressionProps>,
|
|
@@ -2122,6 +2242,8 @@ export type TransformCloneSignatures = AnyTypeAnnotationCloneSignature &
|
|
|
2122
2242
|
MatchExpressionCloneSignature &
|
|
2123
2243
|
MatchExpressionCaseCloneSignature &
|
|
2124
2244
|
MatchIdentifierPatternCloneSignature &
|
|
2245
|
+
MatchInstanceObjectPatternCloneSignature &
|
|
2246
|
+
MatchInstancePatternCloneSignature &
|
|
2125
2247
|
MatchLiteralPatternCloneSignature &
|
|
2126
2248
|
MatchMemberPatternCloneSignature &
|
|
2127
2249
|
MatchObjectPatternCloneSignature &
|
|
@@ -2136,6 +2258,7 @@ export type TransformCloneSignatures = AnyTypeAnnotationCloneSignature &
|
|
|
2136
2258
|
MetaPropertyCloneSignature &
|
|
2137
2259
|
MethodDefinitionCloneSignature &
|
|
2138
2260
|
MixedTypeAnnotationCloneSignature &
|
|
2261
|
+
NeverTypeAnnotationCloneSignature &
|
|
2139
2262
|
NewExpressionCloneSignature &
|
|
2140
2263
|
NullableTypeAnnotationCloneSignature &
|
|
2141
2264
|
NullLiteralCloneSignature &
|
|
@@ -2160,6 +2283,13 @@ export type TransformCloneSignatures = AnyTypeAnnotationCloneSignature &
|
|
|
2160
2283
|
PropertyDefinitionCloneSignature &
|
|
2161
2284
|
QualifiedTypeIdentifierCloneSignature &
|
|
2162
2285
|
QualifiedTypeofIdentifierCloneSignature &
|
|
2286
|
+
RecordDeclarationCloneSignature &
|
|
2287
|
+
RecordDeclarationBodyCloneSignature &
|
|
2288
|
+
RecordDeclarationImplementsCloneSignature &
|
|
2289
|
+
RecordDeclarationPropertyCloneSignature &
|
|
2290
|
+
RecordDeclarationStaticPropertyCloneSignature &
|
|
2291
|
+
RecordExpressionCloneSignature &
|
|
2292
|
+
RecordExpressionPropertiesCloneSignature &
|
|
2163
2293
|
RegExpLiteralCloneSignature &
|
|
2164
2294
|
RestElementCloneSignature &
|
|
2165
2295
|
ReturnStatementCloneSignature &
|
|
@@ -2193,7 +2323,9 @@ export type TransformCloneSignatures = AnyTypeAnnotationCloneSignature &
|
|
|
2193
2323
|
TypeParameterInstantiationCloneSignature &
|
|
2194
2324
|
TypePredicateCloneSignature &
|
|
2195
2325
|
UnaryExpressionCloneSignature &
|
|
2326
|
+
UndefinedTypeAnnotationCloneSignature &
|
|
2196
2327
|
UnionTypeAnnotationCloneSignature &
|
|
2328
|
+
UnknownTypeAnnotationCloneSignature &
|
|
2197
2329
|
UpdateExpressionCloneSignature &
|
|
2198
2330
|
VariableDeclarationCloneSignature &
|
|
2199
2331
|
VariableDeclaratorCloneSignature &
|
|
@@ -140,6 +140,8 @@ import type {
|
|
|
140
140
|
MatchExpression,
|
|
141
141
|
MatchExpressionCase,
|
|
142
142
|
MatchIdentifierPattern,
|
|
143
|
+
MatchInstanceObjectPattern,
|
|
144
|
+
MatchInstancePattern,
|
|
143
145
|
MatchLiteralPattern,
|
|
144
146
|
MatchMemberPattern,
|
|
145
147
|
MatchObjectPattern,
|
|
@@ -154,6 +156,7 @@ import type {
|
|
|
154
156
|
MetaProperty,
|
|
155
157
|
MethodDefinition,
|
|
156
158
|
MixedTypeAnnotation,
|
|
159
|
+
NeverTypeAnnotation,
|
|
157
160
|
NewExpression,
|
|
158
161
|
NullableTypeAnnotation,
|
|
159
162
|
NullLiteral,
|
|
@@ -178,6 +181,13 @@ import type {
|
|
|
178
181
|
PropertyDefinition,
|
|
179
182
|
QualifiedTypeIdentifier,
|
|
180
183
|
QualifiedTypeofIdentifier,
|
|
184
|
+
RecordDeclaration,
|
|
185
|
+
RecordDeclarationBody,
|
|
186
|
+
RecordDeclarationImplements,
|
|
187
|
+
RecordDeclarationProperty,
|
|
188
|
+
RecordDeclarationStaticProperty,
|
|
189
|
+
RecordExpression,
|
|
190
|
+
RecordExpressionProperties,
|
|
181
191
|
RegExpLiteral,
|
|
182
192
|
RestElement,
|
|
183
193
|
ReturnStatement,
|
|
@@ -211,7 +221,9 @@ import type {
|
|
|
211
221
|
TypeParameterInstantiation,
|
|
212
222
|
TypePredicate,
|
|
213
223
|
UnaryExpression,
|
|
224
|
+
UndefinedTypeAnnotation,
|
|
214
225
|
UnionTypeAnnotation,
|
|
226
|
+
UnknownTypeAnnotation,
|
|
215
227
|
UpdateExpression,
|
|
216
228
|
VariableDeclaration,
|
|
217
229
|
VariableDeclarator,
|
|
@@ -340,6 +352,8 @@ import type {
|
|
|
340
352
|
MatchExpressionProps,
|
|
341
353
|
MatchExpressionCaseProps,
|
|
342
354
|
MatchIdentifierPatternProps,
|
|
355
|
+
MatchInstanceObjectPatternProps,
|
|
356
|
+
MatchInstancePatternProps,
|
|
343
357
|
MatchLiteralPatternProps,
|
|
344
358
|
MatchMemberPatternProps,
|
|
345
359
|
MatchObjectPatternProps,
|
|
@@ -354,6 +368,7 @@ import type {
|
|
|
354
368
|
MetaPropertyProps,
|
|
355
369
|
MethodDefinitionProps,
|
|
356
370
|
MixedTypeAnnotationProps,
|
|
371
|
+
NeverTypeAnnotationProps,
|
|
357
372
|
NewExpressionProps,
|
|
358
373
|
NullableTypeAnnotationProps,
|
|
359
374
|
NullLiteralProps,
|
|
@@ -378,6 +393,13 @@ import type {
|
|
|
378
393
|
PropertyDefinitionProps,
|
|
379
394
|
QualifiedTypeIdentifierProps,
|
|
380
395
|
QualifiedTypeofIdentifierProps,
|
|
396
|
+
RecordDeclarationProps,
|
|
397
|
+
RecordDeclarationBodyProps,
|
|
398
|
+
RecordDeclarationImplementsProps,
|
|
399
|
+
RecordDeclarationPropertyProps,
|
|
400
|
+
RecordDeclarationStaticPropertyProps,
|
|
401
|
+
RecordExpressionProps,
|
|
402
|
+
RecordExpressionPropertiesProps,
|
|
381
403
|
RegExpLiteralProps,
|
|
382
404
|
RestElementProps,
|
|
383
405
|
ReturnStatementProps,
|
|
@@ -411,7 +433,9 @@ import type {
|
|
|
411
433
|
TypeParameterInstantiationProps,
|
|
412
434
|
TypePredicateProps,
|
|
413
435
|
UnaryExpressionProps,
|
|
436
|
+
UndefinedTypeAnnotationProps,
|
|
414
437
|
UnionTypeAnnotationProps,
|
|
438
|
+
UnknownTypeAnnotationProps,
|
|
415
439
|
UpdateExpressionProps,
|
|
416
440
|
VariableDeclarationProps,
|
|
417
441
|
VariableDeclaratorProps,
|
|
@@ -894,6 +918,14 @@ type MatchIdentifierPatternModifySignature = (
|
|
|
894
918
|
node: ?MatchIdentifierPattern,
|
|
895
919
|
newProps: Partial<MatchIdentifierPatternProps>,
|
|
896
920
|
) => void;
|
|
921
|
+
type MatchInstanceObjectPatternModifySignature = (
|
|
922
|
+
node: ?MatchInstanceObjectPattern,
|
|
923
|
+
newProps: Partial<MatchInstanceObjectPatternProps>,
|
|
924
|
+
) => void;
|
|
925
|
+
type MatchInstancePatternModifySignature = (
|
|
926
|
+
node: ?MatchInstancePattern,
|
|
927
|
+
newProps: Partial<MatchInstancePatternProps>,
|
|
928
|
+
) => void;
|
|
897
929
|
type MatchLiteralPatternModifySignature = (
|
|
898
930
|
node: ?MatchLiteralPattern,
|
|
899
931
|
newProps: Partial<MatchLiteralPatternProps>,
|
|
@@ -950,6 +982,10 @@ type MixedTypeAnnotationModifySignature = (
|
|
|
950
982
|
node: ?MixedTypeAnnotation,
|
|
951
983
|
newProps: Partial<MixedTypeAnnotationProps>,
|
|
952
984
|
) => void;
|
|
985
|
+
type NeverTypeAnnotationModifySignature = (
|
|
986
|
+
node: ?NeverTypeAnnotation,
|
|
987
|
+
newProps: Partial<NeverTypeAnnotationProps>,
|
|
988
|
+
) => void;
|
|
953
989
|
type NewExpressionModifySignature = (
|
|
954
990
|
node: ?NewExpression,
|
|
955
991
|
newProps: Partial<NewExpressionProps>,
|
|
@@ -1046,6 +1082,34 @@ type QualifiedTypeofIdentifierModifySignature = (
|
|
|
1046
1082
|
node: ?QualifiedTypeofIdentifier,
|
|
1047
1083
|
newProps: Partial<QualifiedTypeofIdentifierProps>,
|
|
1048
1084
|
) => void;
|
|
1085
|
+
type RecordDeclarationModifySignature = (
|
|
1086
|
+
node: ?RecordDeclaration,
|
|
1087
|
+
newProps: Partial<RecordDeclarationProps>,
|
|
1088
|
+
) => void;
|
|
1089
|
+
type RecordDeclarationBodyModifySignature = (
|
|
1090
|
+
node: ?RecordDeclarationBody,
|
|
1091
|
+
newProps: Partial<RecordDeclarationBodyProps>,
|
|
1092
|
+
) => void;
|
|
1093
|
+
type RecordDeclarationImplementsModifySignature = (
|
|
1094
|
+
node: ?RecordDeclarationImplements,
|
|
1095
|
+
newProps: Partial<RecordDeclarationImplementsProps>,
|
|
1096
|
+
) => void;
|
|
1097
|
+
type RecordDeclarationPropertyModifySignature = (
|
|
1098
|
+
node: ?RecordDeclarationProperty,
|
|
1099
|
+
newProps: Partial<RecordDeclarationPropertyProps>,
|
|
1100
|
+
) => void;
|
|
1101
|
+
type RecordDeclarationStaticPropertyModifySignature = (
|
|
1102
|
+
node: ?RecordDeclarationStaticProperty,
|
|
1103
|
+
newProps: Partial<RecordDeclarationStaticPropertyProps>,
|
|
1104
|
+
) => void;
|
|
1105
|
+
type RecordExpressionModifySignature = (
|
|
1106
|
+
node: ?RecordExpression,
|
|
1107
|
+
newProps: Partial<RecordExpressionProps>,
|
|
1108
|
+
) => void;
|
|
1109
|
+
type RecordExpressionPropertiesModifySignature = (
|
|
1110
|
+
node: ?RecordExpressionProperties,
|
|
1111
|
+
newProps: Partial<RecordExpressionPropertiesProps>,
|
|
1112
|
+
) => void;
|
|
1049
1113
|
type RegExpLiteralModifySignature = (
|
|
1050
1114
|
node: ?RegExpLiteral,
|
|
1051
1115
|
newProps: Partial<RegExpLiteralProps>,
|
|
@@ -1178,10 +1242,18 @@ type UnaryExpressionModifySignature = (
|
|
|
1178
1242
|
node: ?UnaryExpression,
|
|
1179
1243
|
newProps: Partial<UnaryExpressionProps>,
|
|
1180
1244
|
) => void;
|
|
1245
|
+
type UndefinedTypeAnnotationModifySignature = (
|
|
1246
|
+
node: ?UndefinedTypeAnnotation,
|
|
1247
|
+
newProps: Partial<UndefinedTypeAnnotationProps>,
|
|
1248
|
+
) => void;
|
|
1181
1249
|
type UnionTypeAnnotationModifySignature = (
|
|
1182
1250
|
node: ?UnionTypeAnnotation,
|
|
1183
1251
|
newProps: Partial<UnionTypeAnnotationProps>,
|
|
1184
1252
|
) => void;
|
|
1253
|
+
type UnknownTypeAnnotationModifySignature = (
|
|
1254
|
+
node: ?UnknownTypeAnnotation,
|
|
1255
|
+
newProps: Partial<UnknownTypeAnnotationProps>,
|
|
1256
|
+
) => void;
|
|
1185
1257
|
type UpdateExpressionModifySignature = (
|
|
1186
1258
|
node: ?UpdateExpression,
|
|
1187
1259
|
newProps: Partial<UpdateExpressionProps>,
|
|
@@ -1332,6 +1404,8 @@ export type TransformModifySignatures = AnyTypeAnnotationModifySignature &
|
|
|
1332
1404
|
MatchExpressionModifySignature &
|
|
1333
1405
|
MatchExpressionCaseModifySignature &
|
|
1334
1406
|
MatchIdentifierPatternModifySignature &
|
|
1407
|
+
MatchInstanceObjectPatternModifySignature &
|
|
1408
|
+
MatchInstancePatternModifySignature &
|
|
1335
1409
|
MatchLiteralPatternModifySignature &
|
|
1336
1410
|
MatchMemberPatternModifySignature &
|
|
1337
1411
|
MatchObjectPatternModifySignature &
|
|
@@ -1346,6 +1420,7 @@ export type TransformModifySignatures = AnyTypeAnnotationModifySignature &
|
|
|
1346
1420
|
MetaPropertyModifySignature &
|
|
1347
1421
|
MethodDefinitionModifySignature &
|
|
1348
1422
|
MixedTypeAnnotationModifySignature &
|
|
1423
|
+
NeverTypeAnnotationModifySignature &
|
|
1349
1424
|
NewExpressionModifySignature &
|
|
1350
1425
|
NullableTypeAnnotationModifySignature &
|
|
1351
1426
|
NullLiteralModifySignature &
|
|
@@ -1370,6 +1445,13 @@ export type TransformModifySignatures = AnyTypeAnnotationModifySignature &
|
|
|
1370
1445
|
PropertyDefinitionModifySignature &
|
|
1371
1446
|
QualifiedTypeIdentifierModifySignature &
|
|
1372
1447
|
QualifiedTypeofIdentifierModifySignature &
|
|
1448
|
+
RecordDeclarationModifySignature &
|
|
1449
|
+
RecordDeclarationBodyModifySignature &
|
|
1450
|
+
RecordDeclarationImplementsModifySignature &
|
|
1451
|
+
RecordDeclarationPropertyModifySignature &
|
|
1452
|
+
RecordDeclarationStaticPropertyModifySignature &
|
|
1453
|
+
RecordExpressionModifySignature &
|
|
1454
|
+
RecordExpressionPropertiesModifySignature &
|
|
1373
1455
|
RegExpLiteralModifySignature &
|
|
1374
1456
|
RestElementModifySignature &
|
|
1375
1457
|
ReturnStatementModifySignature &
|
|
@@ -1403,7 +1485,9 @@ export type TransformModifySignatures = AnyTypeAnnotationModifySignature &
|
|
|
1403
1485
|
TypeParameterInstantiationModifySignature &
|
|
1404
1486
|
TypePredicateModifySignature &
|
|
1405
1487
|
UnaryExpressionModifySignature &
|
|
1488
|
+
UndefinedTypeAnnotationModifySignature &
|
|
1406
1489
|
UnionTypeAnnotationModifySignature &
|
|
1490
|
+
UnknownTypeAnnotationModifySignature &
|
|
1407
1491
|
UpdateExpressionModifySignature &
|
|
1408
1492
|
VariableDeclarationModifySignature &
|
|
1409
1493
|
VariableDeclaratorModifySignature &
|
|
@@ -138,6 +138,8 @@ import type {
|
|
|
138
138
|
MatchExpression,
|
|
139
139
|
MatchExpressionCase,
|
|
140
140
|
MatchIdentifierPattern,
|
|
141
|
+
MatchInstanceObjectPattern,
|
|
142
|
+
MatchInstancePattern,
|
|
141
143
|
MatchLiteralPattern,
|
|
142
144
|
MatchMemberPattern,
|
|
143
145
|
MatchObjectPattern,
|
|
@@ -152,6 +154,7 @@ import type {
|
|
|
152
154
|
MetaProperty,
|
|
153
155
|
MethodDefinition,
|
|
154
156
|
MixedTypeAnnotation,
|
|
157
|
+
NeverTypeAnnotation,
|
|
155
158
|
NewExpression,
|
|
156
159
|
NullableTypeAnnotation,
|
|
157
160
|
NullLiteralTypeAnnotation,
|
|
@@ -174,6 +177,13 @@ import type {
|
|
|
174
177
|
PropertyDefinition,
|
|
175
178
|
QualifiedTypeIdentifier,
|
|
176
179
|
QualifiedTypeofIdentifier,
|
|
180
|
+
RecordDeclaration,
|
|
181
|
+
RecordDeclarationBody,
|
|
182
|
+
RecordDeclarationImplements,
|
|
183
|
+
RecordDeclarationProperty,
|
|
184
|
+
RecordDeclarationStaticProperty,
|
|
185
|
+
RecordExpression,
|
|
186
|
+
RecordExpressionProperties,
|
|
177
187
|
RestElement,
|
|
178
188
|
ReturnStatement,
|
|
179
189
|
SequenceExpression,
|
|
@@ -205,7 +215,9 @@ import type {
|
|
|
205
215
|
TypeParameterInstantiation,
|
|
206
216
|
TypePredicate,
|
|
207
217
|
UnaryExpression,
|
|
218
|
+
UndefinedTypeAnnotation,
|
|
208
219
|
UnionTypeAnnotation,
|
|
220
|
+
UnknownTypeAnnotation,
|
|
209
221
|
UpdateExpression,
|
|
210
222
|
VariableDeclaration,
|
|
211
223
|
VariableDeclarator,
|
|
@@ -798,6 +810,16 @@ type MatchIdentifierPatternReplaceSignature = (
|
|
|
798
810
|
nodeToReplaceWith: DetachedNode<MatchIdentifierPattern>,
|
|
799
811
|
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
800
812
|
) => void;
|
|
813
|
+
type MatchInstanceObjectPatternReplaceSignature = (
|
|
814
|
+
target: MatchInstanceObjectPattern,
|
|
815
|
+
nodeToReplaceWith: DetachedNode<MatchInstanceObjectPattern>,
|
|
816
|
+
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
817
|
+
) => void;
|
|
818
|
+
type MatchInstancePatternReplaceSignature = (
|
|
819
|
+
target: MatchInstancePattern,
|
|
820
|
+
nodeToReplaceWith: DetachedNode<MatchInstancePattern>,
|
|
821
|
+
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
822
|
+
) => void;
|
|
801
823
|
type MatchLiteralPatternReplaceSignature = (
|
|
802
824
|
target: MatchLiteralPattern,
|
|
803
825
|
nodeToReplaceWith: DetachedNode<MatchLiteralPattern>,
|
|
@@ -868,6 +890,11 @@ type MixedTypeAnnotationReplaceSignature = (
|
|
|
868
890
|
nodeToReplaceWith: DetachedNode<MixedTypeAnnotation>,
|
|
869
891
|
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
870
892
|
) => void;
|
|
893
|
+
type NeverTypeAnnotationReplaceSignature = (
|
|
894
|
+
target: NeverTypeAnnotation,
|
|
895
|
+
nodeToReplaceWith: DetachedNode<NeverTypeAnnotation>,
|
|
896
|
+
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
897
|
+
) => void;
|
|
871
898
|
type NewExpressionReplaceSignature = (
|
|
872
899
|
target: NewExpression,
|
|
873
900
|
nodeToReplaceWith: DetachedNode<NewExpression>,
|
|
@@ -978,6 +1005,41 @@ type QualifiedTypeofIdentifierReplaceSignature = (
|
|
|
978
1005
|
nodeToReplaceWith: DetachedNode<QualifiedTypeofIdentifier>,
|
|
979
1006
|
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
980
1007
|
) => void;
|
|
1008
|
+
type RecordDeclarationReplaceSignature = (
|
|
1009
|
+
target: RecordDeclaration,
|
|
1010
|
+
nodeToReplaceWith: DetachedNode<RecordDeclaration>,
|
|
1011
|
+
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
1012
|
+
) => void;
|
|
1013
|
+
type RecordDeclarationBodyReplaceSignature = (
|
|
1014
|
+
target: RecordDeclarationBody,
|
|
1015
|
+
nodeToReplaceWith: DetachedNode<RecordDeclarationBody>,
|
|
1016
|
+
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
1017
|
+
) => void;
|
|
1018
|
+
type RecordDeclarationImplementsReplaceSignature = (
|
|
1019
|
+
target: RecordDeclarationImplements,
|
|
1020
|
+
nodeToReplaceWith: DetachedNode<RecordDeclarationImplements>,
|
|
1021
|
+
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
1022
|
+
) => void;
|
|
1023
|
+
type RecordDeclarationPropertyReplaceSignature = (
|
|
1024
|
+
target: RecordDeclarationProperty,
|
|
1025
|
+
nodeToReplaceWith: DetachedNode<RecordDeclarationProperty>,
|
|
1026
|
+
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
1027
|
+
) => void;
|
|
1028
|
+
type RecordDeclarationStaticPropertyReplaceSignature = (
|
|
1029
|
+
target: RecordDeclarationStaticProperty,
|
|
1030
|
+
nodeToReplaceWith: DetachedNode<RecordDeclarationStaticProperty>,
|
|
1031
|
+
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
1032
|
+
) => void;
|
|
1033
|
+
type RecordExpressionReplaceSignature = (
|
|
1034
|
+
target: RecordExpression,
|
|
1035
|
+
nodeToReplaceWith: DetachedNode<RecordExpression>,
|
|
1036
|
+
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
1037
|
+
) => void;
|
|
1038
|
+
type RecordExpressionPropertiesReplaceSignature = (
|
|
1039
|
+
target: RecordExpressionProperties,
|
|
1040
|
+
nodeToReplaceWith: DetachedNode<RecordExpressionProperties>,
|
|
1041
|
+
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
1042
|
+
) => void;
|
|
981
1043
|
type RestElementReplaceSignature = (
|
|
982
1044
|
target: RestElement,
|
|
983
1045
|
nodeToReplaceWith: DetachedNode<RestElement>,
|
|
@@ -1133,11 +1195,21 @@ type UnaryExpressionReplaceSignature = (
|
|
|
1133
1195
|
nodeToReplaceWith: DetachedNode<UnaryExpression>,
|
|
1134
1196
|
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
1135
1197
|
) => void;
|
|
1198
|
+
type UndefinedTypeAnnotationReplaceSignature = (
|
|
1199
|
+
target: UndefinedTypeAnnotation,
|
|
1200
|
+
nodeToReplaceWith: DetachedNode<UndefinedTypeAnnotation>,
|
|
1201
|
+
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
1202
|
+
) => void;
|
|
1136
1203
|
type UnionTypeAnnotationReplaceSignature = (
|
|
1137
1204
|
target: UnionTypeAnnotation,
|
|
1138
1205
|
nodeToReplaceWith: DetachedNode<UnionTypeAnnotation>,
|
|
1139
1206
|
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
1140
1207
|
) => void;
|
|
1208
|
+
type UnknownTypeAnnotationReplaceSignature = (
|
|
1209
|
+
target: UnknownTypeAnnotation,
|
|
1210
|
+
nodeToReplaceWith: DetachedNode<UnknownTypeAnnotation>,
|
|
1211
|
+
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
1212
|
+
) => void;
|
|
1141
1213
|
type UpdateExpressionReplaceSignature = (
|
|
1142
1214
|
target: UpdateExpression,
|
|
1143
1215
|
nodeToReplaceWith: DetachedNode<UpdateExpression>,
|
|
@@ -1299,6 +1371,8 @@ export type TransformReplaceSignatures = AnyTypeAnnotationReplaceSignature &
|
|
|
1299
1371
|
MatchExpressionReplaceSignature &
|
|
1300
1372
|
MatchExpressionCaseReplaceSignature &
|
|
1301
1373
|
MatchIdentifierPatternReplaceSignature &
|
|
1374
|
+
MatchInstanceObjectPatternReplaceSignature &
|
|
1375
|
+
MatchInstancePatternReplaceSignature &
|
|
1302
1376
|
MatchLiteralPatternReplaceSignature &
|
|
1303
1377
|
MatchMemberPatternReplaceSignature &
|
|
1304
1378
|
MatchObjectPatternReplaceSignature &
|
|
@@ -1313,6 +1387,7 @@ export type TransformReplaceSignatures = AnyTypeAnnotationReplaceSignature &
|
|
|
1313
1387
|
MetaPropertyReplaceSignature &
|
|
1314
1388
|
MethodDefinitionReplaceSignature &
|
|
1315
1389
|
MixedTypeAnnotationReplaceSignature &
|
|
1390
|
+
NeverTypeAnnotationReplaceSignature &
|
|
1316
1391
|
NewExpressionReplaceSignature &
|
|
1317
1392
|
NullableTypeAnnotationReplaceSignature &
|
|
1318
1393
|
NullLiteralTypeAnnotationReplaceSignature &
|
|
@@ -1335,6 +1410,13 @@ export type TransformReplaceSignatures = AnyTypeAnnotationReplaceSignature &
|
|
|
1335
1410
|
PropertyDefinitionReplaceSignature &
|
|
1336
1411
|
QualifiedTypeIdentifierReplaceSignature &
|
|
1337
1412
|
QualifiedTypeofIdentifierReplaceSignature &
|
|
1413
|
+
RecordDeclarationReplaceSignature &
|
|
1414
|
+
RecordDeclarationBodyReplaceSignature &
|
|
1415
|
+
RecordDeclarationImplementsReplaceSignature &
|
|
1416
|
+
RecordDeclarationPropertyReplaceSignature &
|
|
1417
|
+
RecordDeclarationStaticPropertyReplaceSignature &
|
|
1418
|
+
RecordExpressionReplaceSignature &
|
|
1419
|
+
RecordExpressionPropertiesReplaceSignature &
|
|
1338
1420
|
RestElementReplaceSignature &
|
|
1339
1421
|
ReturnStatementReplaceSignature &
|
|
1340
1422
|
SequenceExpressionReplaceSignature &
|
|
@@ -1366,7 +1448,9 @@ export type TransformReplaceSignatures = AnyTypeAnnotationReplaceSignature &
|
|
|
1366
1448
|
TypeParameterInstantiationReplaceSignature &
|
|
1367
1449
|
TypePredicateReplaceSignature &
|
|
1368
1450
|
UnaryExpressionReplaceSignature &
|
|
1451
|
+
UndefinedTypeAnnotationReplaceSignature &
|
|
1369
1452
|
UnionTypeAnnotationReplaceSignature &
|
|
1453
|
+
UnknownTypeAnnotationReplaceSignature &
|
|
1370
1454
|
UpdateExpressionReplaceSignature &
|
|
1371
1455
|
VariableDeclarationReplaceSignature &
|
|
1372
1456
|
VariableDeclaratorReplaceSignature &
|