hermes-transform 0.10.1 → 0.11.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/detachedNode.js +16 -0
- package/dist/detachedNode.js.flow +14 -0
- package/dist/generated/TransformCloneSignatures.js.flow +154 -0
- package/dist/generated/TransformModifySignatures.js.flow +98 -0
- package/dist/generated/TransformReplaceSignatures.js.flow +98 -0
- package/dist/generated/node-types.js +419 -481
- package/dist/generated/node-types.js.flow +554 -490
- package/dist/generated/special-case-node-types/misc.js +15 -0
- package/dist/generated/special-case-node-types/misc.js.flow +23 -0
- package/dist/index.js +2 -1
- package/dist/index.js.flow +4 -1
- package/dist/transform/comments/comments.js +22 -15
- package/dist/transform/comments/comments.js.flow +24 -13
- package/package.json +4 -4
|
@@ -46,11 +46,18 @@ import type {
|
|
|
46
46
|
ClassDeclaration,
|
|
47
47
|
ClassExpression,
|
|
48
48
|
ClassImplements,
|
|
49
|
+
ComponentDeclaration,
|
|
50
|
+
ComponentParameter,
|
|
51
|
+
ComponentTypeAnnotation,
|
|
52
|
+
ComponentTypeParameter,
|
|
49
53
|
ConditionalExpression,
|
|
54
|
+
ConditionalTypeAnnotation,
|
|
50
55
|
ContinueStatement,
|
|
51
56
|
DebuggerStatement,
|
|
52
57
|
DeclareClass,
|
|
58
|
+
DeclareComponent,
|
|
53
59
|
DeclaredPredicate,
|
|
60
|
+
DeclareEnum,
|
|
54
61
|
DeclareExportAllDeclaration,
|
|
55
62
|
DeclareExportDeclaration,
|
|
56
63
|
DeclareFunction,
|
|
@@ -96,6 +103,7 @@ import type {
|
|
|
96
103
|
ImportSpecifier,
|
|
97
104
|
IndexedAccessType,
|
|
98
105
|
InferredPredicate,
|
|
106
|
+
InferTypeAnnotation,
|
|
99
107
|
InterfaceDeclaration,
|
|
100
108
|
InterfaceExtends,
|
|
101
109
|
InterfaceTypeAnnotation,
|
|
@@ -115,6 +123,7 @@ import type {
|
|
|
115
123
|
JSXSpreadAttribute,
|
|
116
124
|
JSXSpreadChild,
|
|
117
125
|
JSXText,
|
|
126
|
+
KeyofTypeAnnotation,
|
|
118
127
|
LabeledStatement,
|
|
119
128
|
LogicalExpression,
|
|
120
129
|
MemberExpression,
|
|
@@ -134,6 +143,7 @@ import type {
|
|
|
134
143
|
ObjectTypeCallProperty,
|
|
135
144
|
ObjectTypeIndexer,
|
|
136
145
|
ObjectTypeInternalSlot,
|
|
146
|
+
ObjectTypeMappedTypeProperty,
|
|
137
147
|
ObjectTypeProperty,
|
|
138
148
|
ObjectTypeSpreadProperty,
|
|
139
149
|
OpaqueType,
|
|
@@ -142,6 +152,7 @@ import type {
|
|
|
142
152
|
Property,
|
|
143
153
|
PropertyDefinition,
|
|
144
154
|
QualifiedTypeIdentifier,
|
|
155
|
+
QualifiedTypeofIdentifier,
|
|
145
156
|
RegExpLiteral,
|
|
146
157
|
RestElement,
|
|
147
158
|
ReturnStatement,
|
|
@@ -162,6 +173,8 @@ import type {
|
|
|
162
173
|
ThrowStatement,
|
|
163
174
|
TryStatement,
|
|
164
175
|
TupleTypeAnnotation,
|
|
176
|
+
TupleTypeLabeledElement,
|
|
177
|
+
TupleTypeSpreadElement,
|
|
165
178
|
TypeAlias,
|
|
166
179
|
TypeAnnotation,
|
|
167
180
|
TypeCastExpression,
|
|
@@ -169,6 +182,7 @@ import type {
|
|
|
169
182
|
TypeParameter,
|
|
170
183
|
TypeParameterDeclaration,
|
|
171
184
|
TypeParameterInstantiation,
|
|
185
|
+
TypePredicate,
|
|
172
186
|
UnaryExpression,
|
|
173
187
|
UnionTypeAnnotation,
|
|
174
188
|
UpdateExpression,
|
|
@@ -205,11 +219,18 @@ import type {
|
|
|
205
219
|
ClassDeclarationProps,
|
|
206
220
|
ClassExpressionProps,
|
|
207
221
|
ClassImplementsProps,
|
|
222
|
+
ComponentDeclarationProps,
|
|
223
|
+
ComponentParameterProps,
|
|
224
|
+
ComponentTypeAnnotationProps,
|
|
225
|
+
ComponentTypeParameterProps,
|
|
208
226
|
ConditionalExpressionProps,
|
|
227
|
+
ConditionalTypeAnnotationProps,
|
|
209
228
|
ContinueStatementProps,
|
|
210
229
|
DebuggerStatementProps,
|
|
211
230
|
DeclareClassProps,
|
|
231
|
+
DeclareComponentProps,
|
|
212
232
|
DeclaredPredicateProps,
|
|
233
|
+
DeclareEnumProps,
|
|
213
234
|
DeclareExportAllDeclarationProps,
|
|
214
235
|
DeclareExportDeclarationProps,
|
|
215
236
|
DeclareFunctionProps,
|
|
@@ -255,6 +276,7 @@ import type {
|
|
|
255
276
|
ImportSpecifierProps,
|
|
256
277
|
IndexedAccessTypeProps,
|
|
257
278
|
InferredPredicateProps,
|
|
279
|
+
InferTypeAnnotationProps,
|
|
258
280
|
InterfaceDeclarationProps,
|
|
259
281
|
InterfaceExtendsProps,
|
|
260
282
|
InterfaceTypeAnnotationProps,
|
|
@@ -274,6 +296,7 @@ import type {
|
|
|
274
296
|
JSXSpreadAttributeProps,
|
|
275
297
|
JSXSpreadChildProps,
|
|
276
298
|
JSXTextProps,
|
|
299
|
+
KeyofTypeAnnotationProps,
|
|
277
300
|
LabeledStatementProps,
|
|
278
301
|
LogicalExpressionProps,
|
|
279
302
|
MemberExpressionProps,
|
|
@@ -293,6 +316,7 @@ import type {
|
|
|
293
316
|
ObjectTypeCallPropertyProps,
|
|
294
317
|
ObjectTypeIndexerProps,
|
|
295
318
|
ObjectTypeInternalSlotProps,
|
|
319
|
+
ObjectTypeMappedTypePropertyProps,
|
|
296
320
|
ObjectTypePropertyProps,
|
|
297
321
|
ObjectTypeSpreadPropertyProps,
|
|
298
322
|
OpaqueTypeProps,
|
|
@@ -301,6 +325,7 @@ import type {
|
|
|
301
325
|
PropertyProps,
|
|
302
326
|
PropertyDefinitionProps,
|
|
303
327
|
QualifiedTypeIdentifierProps,
|
|
328
|
+
QualifiedTypeofIdentifierProps,
|
|
304
329
|
RegExpLiteralProps,
|
|
305
330
|
RestElementProps,
|
|
306
331
|
ReturnStatementProps,
|
|
@@ -321,6 +346,8 @@ import type {
|
|
|
321
346
|
ThrowStatementProps,
|
|
322
347
|
TryStatementProps,
|
|
323
348
|
TupleTypeAnnotationProps,
|
|
349
|
+
TupleTypeLabeledElementProps,
|
|
350
|
+
TupleTypeSpreadElementProps,
|
|
324
351
|
TypeAliasProps,
|
|
325
352
|
TypeAnnotationProps,
|
|
326
353
|
TypeCastExpressionProps,
|
|
@@ -328,6 +355,7 @@ import type {
|
|
|
328
355
|
TypeParameterProps,
|
|
329
356
|
TypeParameterDeclarationProps,
|
|
330
357
|
TypeParameterInstantiationProps,
|
|
358
|
+
TypePredicateProps,
|
|
331
359
|
UnaryExpressionProps,
|
|
332
360
|
UnionTypeAnnotationProps,
|
|
333
361
|
UpdateExpressionProps,
|
|
@@ -436,10 +464,30 @@ type ClassImplementsModifySignature = (
|
|
|
436
464
|
node: ?ClassImplements,
|
|
437
465
|
newProps: Partial<ClassImplementsProps>,
|
|
438
466
|
) => void;
|
|
467
|
+
type ComponentDeclarationModifySignature = (
|
|
468
|
+
node: ?ComponentDeclaration,
|
|
469
|
+
newProps: Partial<ComponentDeclarationProps>,
|
|
470
|
+
) => void;
|
|
471
|
+
type ComponentParameterModifySignature = (
|
|
472
|
+
node: ?ComponentParameter,
|
|
473
|
+
newProps: Partial<ComponentParameterProps>,
|
|
474
|
+
) => void;
|
|
475
|
+
type ComponentTypeAnnotationModifySignature = (
|
|
476
|
+
node: ?ComponentTypeAnnotation,
|
|
477
|
+
newProps: Partial<ComponentTypeAnnotationProps>,
|
|
478
|
+
) => void;
|
|
479
|
+
type ComponentTypeParameterModifySignature = (
|
|
480
|
+
node: ?ComponentTypeParameter,
|
|
481
|
+
newProps: Partial<ComponentTypeParameterProps>,
|
|
482
|
+
) => void;
|
|
439
483
|
type ConditionalExpressionModifySignature = (
|
|
440
484
|
node: ?ConditionalExpression,
|
|
441
485
|
newProps: Partial<ConditionalExpressionProps>,
|
|
442
486
|
) => void;
|
|
487
|
+
type ConditionalTypeAnnotationModifySignature = (
|
|
488
|
+
node: ?ConditionalTypeAnnotation,
|
|
489
|
+
newProps: Partial<ConditionalTypeAnnotationProps>,
|
|
490
|
+
) => void;
|
|
443
491
|
type ContinueStatementModifySignature = (
|
|
444
492
|
node: ?ContinueStatement,
|
|
445
493
|
newProps: Partial<ContinueStatementProps>,
|
|
@@ -452,10 +500,18 @@ type DeclareClassModifySignature = (
|
|
|
452
500
|
node: ?DeclareClass,
|
|
453
501
|
newProps: Partial<DeclareClassProps>,
|
|
454
502
|
) => void;
|
|
503
|
+
type DeclareComponentModifySignature = (
|
|
504
|
+
node: ?DeclareComponent,
|
|
505
|
+
newProps: Partial<DeclareComponentProps>,
|
|
506
|
+
) => void;
|
|
455
507
|
type DeclaredPredicateModifySignature = (
|
|
456
508
|
node: ?DeclaredPredicate,
|
|
457
509
|
newProps: Partial<DeclaredPredicateProps>,
|
|
458
510
|
) => void;
|
|
511
|
+
type DeclareEnumModifySignature = (
|
|
512
|
+
node: ?DeclareEnum,
|
|
513
|
+
newProps: Partial<DeclareEnumProps>,
|
|
514
|
+
) => void;
|
|
459
515
|
type DeclareExportAllDeclarationModifySignature = (
|
|
460
516
|
node: ?DeclareExportAllDeclaration,
|
|
461
517
|
newProps: Partial<DeclareExportAllDeclarationProps>,
|
|
@@ -636,6 +692,10 @@ type InferredPredicateModifySignature = (
|
|
|
636
692
|
node: ?InferredPredicate,
|
|
637
693
|
newProps: Partial<InferredPredicateProps>,
|
|
638
694
|
) => void;
|
|
695
|
+
type InferTypeAnnotationModifySignature = (
|
|
696
|
+
node: ?InferTypeAnnotation,
|
|
697
|
+
newProps: Partial<InferTypeAnnotationProps>,
|
|
698
|
+
) => void;
|
|
639
699
|
type InterfaceDeclarationModifySignature = (
|
|
640
700
|
node: ?InterfaceDeclaration,
|
|
641
701
|
newProps: Partial<InterfaceDeclarationProps>,
|
|
@@ -712,6 +772,10 @@ type JSXTextModifySignature = (
|
|
|
712
772
|
node: ?JSXText,
|
|
713
773
|
newProps: Partial<JSXTextProps>,
|
|
714
774
|
) => void;
|
|
775
|
+
type KeyofTypeAnnotationModifySignature = (
|
|
776
|
+
node: ?KeyofTypeAnnotation,
|
|
777
|
+
newProps: Partial<KeyofTypeAnnotationProps>,
|
|
778
|
+
) => void;
|
|
715
779
|
type LabeledStatementModifySignature = (
|
|
716
780
|
node: ?LabeledStatement,
|
|
717
781
|
newProps: Partial<LabeledStatementProps>,
|
|
@@ -788,6 +852,10 @@ type ObjectTypeInternalSlotModifySignature = (
|
|
|
788
852
|
node: ?ObjectTypeInternalSlot,
|
|
789
853
|
newProps: Partial<ObjectTypeInternalSlotProps>,
|
|
790
854
|
) => void;
|
|
855
|
+
type ObjectTypeMappedTypePropertyModifySignature = (
|
|
856
|
+
node: ?ObjectTypeMappedTypeProperty,
|
|
857
|
+
newProps: Partial<ObjectTypeMappedTypePropertyProps>,
|
|
858
|
+
) => void;
|
|
791
859
|
type ObjectTypePropertyModifySignature = (
|
|
792
860
|
node: ?ObjectTypeProperty,
|
|
793
861
|
newProps: Partial<ObjectTypePropertyProps>,
|
|
@@ -820,6 +888,10 @@ type QualifiedTypeIdentifierModifySignature = (
|
|
|
820
888
|
node: ?QualifiedTypeIdentifier,
|
|
821
889
|
newProps: Partial<QualifiedTypeIdentifierProps>,
|
|
822
890
|
) => void;
|
|
891
|
+
type QualifiedTypeofIdentifierModifySignature = (
|
|
892
|
+
node: ?QualifiedTypeofIdentifier,
|
|
893
|
+
newProps: Partial<QualifiedTypeofIdentifierProps>,
|
|
894
|
+
) => void;
|
|
823
895
|
type RegExpLiteralModifySignature = (
|
|
824
896
|
node: ?RegExpLiteral,
|
|
825
897
|
newProps: Partial<RegExpLiteralProps>,
|
|
@@ -900,6 +972,14 @@ type TupleTypeAnnotationModifySignature = (
|
|
|
900
972
|
node: ?TupleTypeAnnotation,
|
|
901
973
|
newProps: Partial<TupleTypeAnnotationProps>,
|
|
902
974
|
) => void;
|
|
975
|
+
type TupleTypeLabeledElementModifySignature = (
|
|
976
|
+
node: ?TupleTypeLabeledElement,
|
|
977
|
+
newProps: Partial<TupleTypeLabeledElementProps>,
|
|
978
|
+
) => void;
|
|
979
|
+
type TupleTypeSpreadElementModifySignature = (
|
|
980
|
+
node: ?TupleTypeSpreadElement,
|
|
981
|
+
newProps: Partial<TupleTypeSpreadElementProps>,
|
|
982
|
+
) => void;
|
|
903
983
|
type TypeAliasModifySignature = (
|
|
904
984
|
node: ?TypeAlias,
|
|
905
985
|
newProps: Partial<TypeAliasProps>,
|
|
@@ -928,6 +1008,10 @@ type TypeParameterInstantiationModifySignature = (
|
|
|
928
1008
|
node: ?TypeParameterInstantiation,
|
|
929
1009
|
newProps: Partial<TypeParameterInstantiationProps>,
|
|
930
1010
|
) => void;
|
|
1011
|
+
type TypePredicateModifySignature = (
|
|
1012
|
+
node: ?TypePredicate,
|
|
1013
|
+
newProps: Partial<TypePredicateProps>,
|
|
1014
|
+
) => void;
|
|
931
1015
|
type UnaryExpressionModifySignature = (
|
|
932
1016
|
node: ?UnaryExpression,
|
|
933
1017
|
newProps: Partial<UnaryExpressionProps>,
|
|
@@ -992,11 +1076,18 @@ export type TransformModifySignatures = AnyTypeAnnotationModifySignature &
|
|
|
992
1076
|
ClassDeclarationModifySignature &
|
|
993
1077
|
ClassExpressionModifySignature &
|
|
994
1078
|
ClassImplementsModifySignature &
|
|
1079
|
+
ComponentDeclarationModifySignature &
|
|
1080
|
+
ComponentParameterModifySignature &
|
|
1081
|
+
ComponentTypeAnnotationModifySignature &
|
|
1082
|
+
ComponentTypeParameterModifySignature &
|
|
995
1083
|
ConditionalExpressionModifySignature &
|
|
1084
|
+
ConditionalTypeAnnotationModifySignature &
|
|
996
1085
|
ContinueStatementModifySignature &
|
|
997
1086
|
DebuggerStatementModifySignature &
|
|
998
1087
|
DeclareClassModifySignature &
|
|
1088
|
+
DeclareComponentModifySignature &
|
|
999
1089
|
DeclaredPredicateModifySignature &
|
|
1090
|
+
DeclareEnumModifySignature &
|
|
1000
1091
|
DeclareExportAllDeclarationModifySignature &
|
|
1001
1092
|
DeclareExportDeclarationModifySignature &
|
|
1002
1093
|
DeclareFunctionModifySignature &
|
|
@@ -1042,6 +1133,7 @@ export type TransformModifySignatures = AnyTypeAnnotationModifySignature &
|
|
|
1042
1133
|
ImportSpecifierModifySignature &
|
|
1043
1134
|
IndexedAccessTypeModifySignature &
|
|
1044
1135
|
InferredPredicateModifySignature &
|
|
1136
|
+
InferTypeAnnotationModifySignature &
|
|
1045
1137
|
InterfaceDeclarationModifySignature &
|
|
1046
1138
|
InterfaceExtendsModifySignature &
|
|
1047
1139
|
InterfaceTypeAnnotationModifySignature &
|
|
@@ -1061,6 +1153,7 @@ export type TransformModifySignatures = AnyTypeAnnotationModifySignature &
|
|
|
1061
1153
|
JSXSpreadAttributeModifySignature &
|
|
1062
1154
|
JSXSpreadChildModifySignature &
|
|
1063
1155
|
JSXTextModifySignature &
|
|
1156
|
+
KeyofTypeAnnotationModifySignature &
|
|
1064
1157
|
LabeledStatementModifySignature &
|
|
1065
1158
|
LogicalExpressionModifySignature &
|
|
1066
1159
|
MemberExpressionModifySignature &
|
|
@@ -1080,6 +1173,7 @@ export type TransformModifySignatures = AnyTypeAnnotationModifySignature &
|
|
|
1080
1173
|
ObjectTypeCallPropertyModifySignature &
|
|
1081
1174
|
ObjectTypeIndexerModifySignature &
|
|
1082
1175
|
ObjectTypeInternalSlotModifySignature &
|
|
1176
|
+
ObjectTypeMappedTypePropertyModifySignature &
|
|
1083
1177
|
ObjectTypePropertyModifySignature &
|
|
1084
1178
|
ObjectTypeSpreadPropertyModifySignature &
|
|
1085
1179
|
OpaqueTypeModifySignature &
|
|
@@ -1088,6 +1182,7 @@ export type TransformModifySignatures = AnyTypeAnnotationModifySignature &
|
|
|
1088
1182
|
PropertyModifySignature &
|
|
1089
1183
|
PropertyDefinitionModifySignature &
|
|
1090
1184
|
QualifiedTypeIdentifierModifySignature &
|
|
1185
|
+
QualifiedTypeofIdentifierModifySignature &
|
|
1091
1186
|
RegExpLiteralModifySignature &
|
|
1092
1187
|
RestElementModifySignature &
|
|
1093
1188
|
ReturnStatementModifySignature &
|
|
@@ -1108,6 +1203,8 @@ export type TransformModifySignatures = AnyTypeAnnotationModifySignature &
|
|
|
1108
1203
|
ThrowStatementModifySignature &
|
|
1109
1204
|
TryStatementModifySignature &
|
|
1110
1205
|
TupleTypeAnnotationModifySignature &
|
|
1206
|
+
TupleTypeLabeledElementModifySignature &
|
|
1207
|
+
TupleTypeSpreadElementModifySignature &
|
|
1111
1208
|
TypeAliasModifySignature &
|
|
1112
1209
|
TypeAnnotationModifySignature &
|
|
1113
1210
|
TypeCastExpressionModifySignature &
|
|
@@ -1115,6 +1212,7 @@ export type TransformModifySignatures = AnyTypeAnnotationModifySignature &
|
|
|
1115
1212
|
TypeParameterModifySignature &
|
|
1116
1213
|
TypeParameterDeclarationModifySignature &
|
|
1117
1214
|
TypeParameterInstantiationModifySignature &
|
|
1215
|
+
TypePredicateModifySignature &
|
|
1118
1216
|
UnaryExpressionModifySignature &
|
|
1119
1217
|
UnionTypeAnnotationModifySignature &
|
|
1120
1218
|
UpdateExpressionModifySignature &
|
|
@@ -44,11 +44,18 @@ import type {
|
|
|
44
44
|
ClassDeclaration,
|
|
45
45
|
ClassExpression,
|
|
46
46
|
ClassImplements,
|
|
47
|
+
ComponentDeclaration,
|
|
48
|
+
ComponentParameter,
|
|
49
|
+
ComponentTypeAnnotation,
|
|
50
|
+
ComponentTypeParameter,
|
|
47
51
|
ConditionalExpression,
|
|
52
|
+
ConditionalTypeAnnotation,
|
|
48
53
|
ContinueStatement,
|
|
49
54
|
DebuggerStatement,
|
|
50
55
|
DeclareClass,
|
|
56
|
+
DeclareComponent,
|
|
51
57
|
DeclaredPredicate,
|
|
58
|
+
DeclareEnum,
|
|
52
59
|
DeclareExportAllDeclaration,
|
|
53
60
|
DeclareExportDeclaration,
|
|
54
61
|
DeclareFunction,
|
|
@@ -94,6 +101,7 @@ import type {
|
|
|
94
101
|
ImportSpecifier,
|
|
95
102
|
IndexedAccessType,
|
|
96
103
|
InferredPredicate,
|
|
104
|
+
InferTypeAnnotation,
|
|
97
105
|
InterfaceDeclaration,
|
|
98
106
|
InterfaceExtends,
|
|
99
107
|
InterfaceTypeAnnotation,
|
|
@@ -113,6 +121,7 @@ import type {
|
|
|
113
121
|
JSXSpreadAttribute,
|
|
114
122
|
JSXSpreadChild,
|
|
115
123
|
JSXText,
|
|
124
|
+
KeyofTypeAnnotation,
|
|
116
125
|
LabeledStatement,
|
|
117
126
|
LogicalExpression,
|
|
118
127
|
MemberExpression,
|
|
@@ -130,6 +139,7 @@ import type {
|
|
|
130
139
|
ObjectTypeCallProperty,
|
|
131
140
|
ObjectTypeIndexer,
|
|
132
141
|
ObjectTypeInternalSlot,
|
|
142
|
+
ObjectTypeMappedTypeProperty,
|
|
133
143
|
ObjectTypeProperty,
|
|
134
144
|
ObjectTypeSpreadProperty,
|
|
135
145
|
OpaqueType,
|
|
@@ -139,6 +149,7 @@ import type {
|
|
|
139
149
|
Property,
|
|
140
150
|
PropertyDefinition,
|
|
141
151
|
QualifiedTypeIdentifier,
|
|
152
|
+
QualifiedTypeofIdentifier,
|
|
142
153
|
RestElement,
|
|
143
154
|
ReturnStatement,
|
|
144
155
|
SequenceExpression,
|
|
@@ -157,6 +168,8 @@ import type {
|
|
|
157
168
|
ThrowStatement,
|
|
158
169
|
TryStatement,
|
|
159
170
|
TupleTypeAnnotation,
|
|
171
|
+
TupleTypeLabeledElement,
|
|
172
|
+
TupleTypeSpreadElement,
|
|
160
173
|
TypeAlias,
|
|
161
174
|
TypeAnnotation,
|
|
162
175
|
TypeCastExpression,
|
|
@@ -164,6 +177,7 @@ import type {
|
|
|
164
177
|
TypeParameter,
|
|
165
178
|
TypeParameterDeclaration,
|
|
166
179
|
TypeParameterInstantiation,
|
|
180
|
+
TypePredicate,
|
|
167
181
|
UnaryExpression,
|
|
168
182
|
UnionTypeAnnotation,
|
|
169
183
|
UpdateExpression,
|
|
@@ -288,11 +302,36 @@ type ClassImplementsReplaceSignature = (
|
|
|
288
302
|
nodeToReplaceWith: DetachedNode<ClassImplements>,
|
|
289
303
|
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
290
304
|
) => void;
|
|
305
|
+
type ComponentDeclarationReplaceSignature = (
|
|
306
|
+
target: ComponentDeclaration,
|
|
307
|
+
nodeToReplaceWith: DetachedNode<ComponentDeclaration>,
|
|
308
|
+
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
309
|
+
) => void;
|
|
310
|
+
type ComponentParameterReplaceSignature = (
|
|
311
|
+
target: ComponentParameter,
|
|
312
|
+
nodeToReplaceWith: DetachedNode<ComponentParameter>,
|
|
313
|
+
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
314
|
+
) => void;
|
|
315
|
+
type ComponentTypeAnnotationReplaceSignature = (
|
|
316
|
+
target: ComponentTypeAnnotation,
|
|
317
|
+
nodeToReplaceWith: DetachedNode<ComponentTypeAnnotation>,
|
|
318
|
+
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
319
|
+
) => void;
|
|
320
|
+
type ComponentTypeParameterReplaceSignature = (
|
|
321
|
+
target: ComponentTypeParameter,
|
|
322
|
+
nodeToReplaceWith: DetachedNode<ComponentTypeParameter>,
|
|
323
|
+
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
324
|
+
) => void;
|
|
291
325
|
type ConditionalExpressionReplaceSignature = (
|
|
292
326
|
target: ConditionalExpression,
|
|
293
327
|
nodeToReplaceWith: DetachedNode<ConditionalExpression>,
|
|
294
328
|
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
295
329
|
) => void;
|
|
330
|
+
type ConditionalTypeAnnotationReplaceSignature = (
|
|
331
|
+
target: ConditionalTypeAnnotation,
|
|
332
|
+
nodeToReplaceWith: DetachedNode<ConditionalTypeAnnotation>,
|
|
333
|
+
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
334
|
+
) => void;
|
|
296
335
|
type ContinueStatementReplaceSignature = (
|
|
297
336
|
target: ContinueStatement,
|
|
298
337
|
nodeToReplaceWith: DetachedNode<ContinueStatement>,
|
|
@@ -308,11 +347,21 @@ type DeclareClassReplaceSignature = (
|
|
|
308
347
|
nodeToReplaceWith: DetachedNode<DeclareClass>,
|
|
309
348
|
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
310
349
|
) => void;
|
|
350
|
+
type DeclareComponentReplaceSignature = (
|
|
351
|
+
target: DeclareComponent,
|
|
352
|
+
nodeToReplaceWith: DetachedNode<DeclareComponent>,
|
|
353
|
+
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
354
|
+
) => void;
|
|
311
355
|
type DeclaredPredicateReplaceSignature = (
|
|
312
356
|
target: DeclaredPredicate,
|
|
313
357
|
nodeToReplaceWith: DetachedNode<DeclaredPredicate>,
|
|
314
358
|
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
315
359
|
) => void;
|
|
360
|
+
type DeclareEnumReplaceSignature = (
|
|
361
|
+
target: DeclareEnum,
|
|
362
|
+
nodeToReplaceWith: DetachedNode<DeclareEnum>,
|
|
363
|
+
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
364
|
+
) => void;
|
|
316
365
|
type DeclareExportAllDeclarationReplaceSignature = (
|
|
317
366
|
target: DeclareExportAllDeclaration,
|
|
318
367
|
nodeToReplaceWith: DetachedNode<DeclareExportAllDeclaration>,
|
|
@@ -538,6 +587,11 @@ type InferredPredicateReplaceSignature = (
|
|
|
538
587
|
nodeToReplaceWith: DetachedNode<InferredPredicate>,
|
|
539
588
|
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
540
589
|
) => void;
|
|
590
|
+
type InferTypeAnnotationReplaceSignature = (
|
|
591
|
+
target: InferTypeAnnotation,
|
|
592
|
+
nodeToReplaceWith: DetachedNode<InferTypeAnnotation>,
|
|
593
|
+
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
594
|
+
) => void;
|
|
541
595
|
type InterfaceDeclarationReplaceSignature = (
|
|
542
596
|
target: InterfaceDeclaration,
|
|
543
597
|
nodeToReplaceWith: DetachedNode<InterfaceDeclaration>,
|
|
@@ -633,6 +687,11 @@ type JSXTextReplaceSignature = (
|
|
|
633
687
|
nodeToReplaceWith: DetachedNode<JSXText>,
|
|
634
688
|
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
635
689
|
) => void;
|
|
690
|
+
type KeyofTypeAnnotationReplaceSignature = (
|
|
691
|
+
target: KeyofTypeAnnotation,
|
|
692
|
+
nodeToReplaceWith: DetachedNode<KeyofTypeAnnotation>,
|
|
693
|
+
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
694
|
+
) => void;
|
|
636
695
|
type LabeledStatementReplaceSignature = (
|
|
637
696
|
target: LabeledStatement,
|
|
638
697
|
nodeToReplaceWith: DetachedNode<LabeledStatement>,
|
|
@@ -718,6 +777,11 @@ type ObjectTypeInternalSlotReplaceSignature = (
|
|
|
718
777
|
nodeToReplaceWith: DetachedNode<ObjectTypeInternalSlot>,
|
|
719
778
|
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
720
779
|
) => void;
|
|
780
|
+
type ObjectTypeMappedTypePropertyReplaceSignature = (
|
|
781
|
+
target: ObjectTypeMappedTypeProperty,
|
|
782
|
+
nodeToReplaceWith: DetachedNode<ObjectTypeMappedTypeProperty>,
|
|
783
|
+
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
784
|
+
) => void;
|
|
721
785
|
type ObjectTypePropertyReplaceSignature = (
|
|
722
786
|
target: ObjectTypeProperty,
|
|
723
787
|
nodeToReplaceWith: DetachedNode<ObjectTypeProperty>,
|
|
@@ -763,6 +827,11 @@ type QualifiedTypeIdentifierReplaceSignature = (
|
|
|
763
827
|
nodeToReplaceWith: DetachedNode<QualifiedTypeIdentifier>,
|
|
764
828
|
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
765
829
|
) => void;
|
|
830
|
+
type QualifiedTypeofIdentifierReplaceSignature = (
|
|
831
|
+
target: QualifiedTypeofIdentifier,
|
|
832
|
+
nodeToReplaceWith: DetachedNode<QualifiedTypeofIdentifier>,
|
|
833
|
+
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
834
|
+
) => void;
|
|
766
835
|
type RestElementReplaceSignature = (
|
|
767
836
|
target: RestElement,
|
|
768
837
|
nodeToReplaceWith: DetachedNode<RestElement>,
|
|
@@ -853,6 +922,16 @@ type TupleTypeAnnotationReplaceSignature = (
|
|
|
853
922
|
nodeToReplaceWith: DetachedNode<TupleTypeAnnotation>,
|
|
854
923
|
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
855
924
|
) => void;
|
|
925
|
+
type TupleTypeLabeledElementReplaceSignature = (
|
|
926
|
+
target: TupleTypeLabeledElement,
|
|
927
|
+
nodeToReplaceWith: DetachedNode<TupleTypeLabeledElement>,
|
|
928
|
+
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
929
|
+
) => void;
|
|
930
|
+
type TupleTypeSpreadElementReplaceSignature = (
|
|
931
|
+
target: TupleTypeSpreadElement,
|
|
932
|
+
nodeToReplaceWith: DetachedNode<TupleTypeSpreadElement>,
|
|
933
|
+
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
934
|
+
) => void;
|
|
856
935
|
type TypeAliasReplaceSignature = (
|
|
857
936
|
target: TypeAlias,
|
|
858
937
|
nodeToReplaceWith: DetachedNode<TypeAlias>,
|
|
@@ -888,6 +967,11 @@ type TypeParameterInstantiationReplaceSignature = (
|
|
|
888
967
|
nodeToReplaceWith: DetachedNode<TypeParameterInstantiation>,
|
|
889
968
|
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
890
969
|
) => void;
|
|
970
|
+
type TypePredicateReplaceSignature = (
|
|
971
|
+
target: TypePredicate,
|
|
972
|
+
nodeToReplaceWith: DetachedNode<TypePredicate>,
|
|
973
|
+
options?: $ReadOnly<{keepComments?: boolean}>,
|
|
974
|
+
) => void;
|
|
891
975
|
type UnaryExpressionReplaceSignature = (
|
|
892
976
|
target: UnaryExpression,
|
|
893
977
|
nodeToReplaceWith: DetachedNode<UnaryExpression>,
|
|
@@ -965,11 +1049,18 @@ export type TransformReplaceSignatures = AnyTypeAnnotationReplaceSignature &
|
|
|
965
1049
|
ClassDeclarationReplaceSignature &
|
|
966
1050
|
ClassExpressionReplaceSignature &
|
|
967
1051
|
ClassImplementsReplaceSignature &
|
|
1052
|
+
ComponentDeclarationReplaceSignature &
|
|
1053
|
+
ComponentParameterReplaceSignature &
|
|
1054
|
+
ComponentTypeAnnotationReplaceSignature &
|
|
1055
|
+
ComponentTypeParameterReplaceSignature &
|
|
968
1056
|
ConditionalExpressionReplaceSignature &
|
|
1057
|
+
ConditionalTypeAnnotationReplaceSignature &
|
|
969
1058
|
ContinueStatementReplaceSignature &
|
|
970
1059
|
DebuggerStatementReplaceSignature &
|
|
971
1060
|
DeclareClassReplaceSignature &
|
|
1061
|
+
DeclareComponentReplaceSignature &
|
|
972
1062
|
DeclaredPredicateReplaceSignature &
|
|
1063
|
+
DeclareEnumReplaceSignature &
|
|
973
1064
|
DeclareExportAllDeclarationReplaceSignature &
|
|
974
1065
|
DeclareExportDeclarationReplaceSignature &
|
|
975
1066
|
DeclareFunctionReplaceSignature &
|
|
@@ -1015,6 +1106,7 @@ export type TransformReplaceSignatures = AnyTypeAnnotationReplaceSignature &
|
|
|
1015
1106
|
ImportSpecifierReplaceSignature &
|
|
1016
1107
|
IndexedAccessTypeReplaceSignature &
|
|
1017
1108
|
InferredPredicateReplaceSignature &
|
|
1109
|
+
InferTypeAnnotationReplaceSignature &
|
|
1018
1110
|
InterfaceDeclarationReplaceSignature &
|
|
1019
1111
|
InterfaceExtendsReplaceSignature &
|
|
1020
1112
|
InterfaceTypeAnnotationReplaceSignature &
|
|
@@ -1034,6 +1126,7 @@ export type TransformReplaceSignatures = AnyTypeAnnotationReplaceSignature &
|
|
|
1034
1126
|
JSXSpreadAttributeReplaceSignature &
|
|
1035
1127
|
JSXSpreadChildReplaceSignature &
|
|
1036
1128
|
JSXTextReplaceSignature &
|
|
1129
|
+
KeyofTypeAnnotationReplaceSignature &
|
|
1037
1130
|
LabeledStatementReplaceSignature &
|
|
1038
1131
|
LogicalExpressionReplaceSignature &
|
|
1039
1132
|
MemberExpressionReplaceSignature &
|
|
@@ -1051,6 +1144,7 @@ export type TransformReplaceSignatures = AnyTypeAnnotationReplaceSignature &
|
|
|
1051
1144
|
ObjectTypeCallPropertyReplaceSignature &
|
|
1052
1145
|
ObjectTypeIndexerReplaceSignature &
|
|
1053
1146
|
ObjectTypeInternalSlotReplaceSignature &
|
|
1147
|
+
ObjectTypeMappedTypePropertyReplaceSignature &
|
|
1054
1148
|
ObjectTypePropertyReplaceSignature &
|
|
1055
1149
|
ObjectTypeSpreadPropertyReplaceSignature &
|
|
1056
1150
|
OpaqueTypeReplaceSignature &
|
|
@@ -1060,6 +1154,7 @@ export type TransformReplaceSignatures = AnyTypeAnnotationReplaceSignature &
|
|
|
1060
1154
|
PropertyReplaceSignature &
|
|
1061
1155
|
PropertyDefinitionReplaceSignature &
|
|
1062
1156
|
QualifiedTypeIdentifierReplaceSignature &
|
|
1157
|
+
QualifiedTypeofIdentifierReplaceSignature &
|
|
1063
1158
|
RestElementReplaceSignature &
|
|
1064
1159
|
ReturnStatementReplaceSignature &
|
|
1065
1160
|
SequenceExpressionReplaceSignature &
|
|
@@ -1078,6 +1173,8 @@ export type TransformReplaceSignatures = AnyTypeAnnotationReplaceSignature &
|
|
|
1078
1173
|
ThrowStatementReplaceSignature &
|
|
1079
1174
|
TryStatementReplaceSignature &
|
|
1080
1175
|
TupleTypeAnnotationReplaceSignature &
|
|
1176
|
+
TupleTypeLabeledElementReplaceSignature &
|
|
1177
|
+
TupleTypeSpreadElementReplaceSignature &
|
|
1081
1178
|
TypeAliasReplaceSignature &
|
|
1082
1179
|
TypeAnnotationReplaceSignature &
|
|
1083
1180
|
TypeCastExpressionReplaceSignature &
|
|
@@ -1085,6 +1182,7 @@ export type TransformReplaceSignatures = AnyTypeAnnotationReplaceSignature &
|
|
|
1085
1182
|
TypeParameterReplaceSignature &
|
|
1086
1183
|
TypeParameterDeclarationReplaceSignature &
|
|
1087
1184
|
TypeParameterInstantiationReplaceSignature &
|
|
1185
|
+
TypePredicateReplaceSignature &
|
|
1088
1186
|
UnaryExpressionReplaceSignature &
|
|
1089
1187
|
UnionTypeAnnotationReplaceSignature &
|
|
1090
1188
|
UpdateExpressionReplaceSignature &
|