hermes-estree 0.10.0 → 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.
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
// lint directives to let us do some basic validation of generated files
|
|
19
19
|
/* eslint no-undef: 'error', no-unused-vars: ['error', {vars: "local"}], no-redeclare: 'error' */
|
|
20
|
-
/* global $NonMaybeType,
|
|
20
|
+
/* global $NonMaybeType, Partial, $ReadOnly, $ReadOnlyArray */
|
|
21
21
|
|
|
22
22
|
'use strict';
|
|
23
23
|
|
|
@@ -45,11 +45,18 @@ import type {
|
|
|
45
45
|
ClassDeclaration,
|
|
46
46
|
ClassExpression,
|
|
47
47
|
ClassImplements,
|
|
48
|
+
ComponentDeclaration,
|
|
49
|
+
ComponentParameter,
|
|
50
|
+
ComponentTypeAnnotation,
|
|
51
|
+
ComponentTypeParameter,
|
|
48
52
|
ConditionalExpression,
|
|
53
|
+
ConditionalTypeAnnotation,
|
|
49
54
|
ContinueStatement,
|
|
50
55
|
DebuggerStatement,
|
|
51
56
|
DeclareClass,
|
|
57
|
+
DeclareComponent,
|
|
52
58
|
DeclaredPredicate,
|
|
59
|
+
DeclareEnum,
|
|
53
60
|
DeclareExportAllDeclaration,
|
|
54
61
|
DeclareExportDeclaration,
|
|
55
62
|
DeclareFunction,
|
|
@@ -95,6 +102,7 @@ import type {
|
|
|
95
102
|
ImportSpecifier,
|
|
96
103
|
IndexedAccessType,
|
|
97
104
|
InferredPredicate,
|
|
105
|
+
InferTypeAnnotation,
|
|
98
106
|
InterfaceDeclaration,
|
|
99
107
|
InterfaceExtends,
|
|
100
108
|
InterfaceTypeAnnotation,
|
|
@@ -114,6 +122,7 @@ import type {
|
|
|
114
122
|
JSXSpreadAttribute,
|
|
115
123
|
JSXSpreadChild,
|
|
116
124
|
JSXText,
|
|
125
|
+
KeyofTypeAnnotation,
|
|
117
126
|
LabeledStatement,
|
|
118
127
|
LogicalExpression,
|
|
119
128
|
MemberExpression,
|
|
@@ -131,6 +140,7 @@ import type {
|
|
|
131
140
|
ObjectTypeCallProperty,
|
|
132
141
|
ObjectTypeIndexer,
|
|
133
142
|
ObjectTypeInternalSlot,
|
|
143
|
+
ObjectTypeMappedTypeProperty,
|
|
134
144
|
ObjectTypeProperty,
|
|
135
145
|
ObjectTypeSpreadProperty,
|
|
136
146
|
OpaqueType,
|
|
@@ -140,6 +150,7 @@ import type {
|
|
|
140
150
|
Property,
|
|
141
151
|
PropertyDefinition,
|
|
142
152
|
QualifiedTypeIdentifier,
|
|
153
|
+
QualifiedTypeofIdentifier,
|
|
143
154
|
RestElement,
|
|
144
155
|
ReturnStatement,
|
|
145
156
|
SequenceExpression,
|
|
@@ -158,6 +169,8 @@ import type {
|
|
|
158
169
|
ThrowStatement,
|
|
159
170
|
TryStatement,
|
|
160
171
|
TupleTypeAnnotation,
|
|
172
|
+
TupleTypeLabeledElement,
|
|
173
|
+
TupleTypeSpreadElement,
|
|
161
174
|
TypeAlias,
|
|
162
175
|
TypeAnnotation,
|
|
163
176
|
TypeCastExpression,
|
|
@@ -165,6 +178,7 @@ import type {
|
|
|
165
178
|
TypeParameter,
|
|
166
179
|
TypeParameterDeclaration,
|
|
167
180
|
TypeParameterInstantiation,
|
|
181
|
+
TypePredicate,
|
|
168
182
|
UnaryExpression,
|
|
169
183
|
UnionTypeAnnotation,
|
|
170
184
|
UpdateExpression,
|
|
@@ -335,6 +349,55 @@ interface ClassImplements_With_id extends ClassImplements {
|
|
|
335
349
|
interface ClassImplements_With_typeParameters extends ClassImplements {
|
|
336
350
|
+typeParameters: $NonMaybeType<ClassImplements['typeParameters']>;
|
|
337
351
|
}
|
|
352
|
+
interface ComponentDeclaration_With_id extends ComponentDeclaration {
|
|
353
|
+
+id: $NonMaybeType<ComponentDeclaration['id']>;
|
|
354
|
+
}
|
|
355
|
+
interface ComponentDeclaration_With_params extends ComponentDeclaration {
|
|
356
|
+
+params: $NonMaybeType<ComponentDeclaration['params']>;
|
|
357
|
+
}
|
|
358
|
+
interface ComponentDeclaration_With_body extends ComponentDeclaration {
|
|
359
|
+
+body: $NonMaybeType<ComponentDeclaration['body']>;
|
|
360
|
+
}
|
|
361
|
+
interface ComponentDeclaration_With_typeParameters
|
|
362
|
+
extends ComponentDeclaration {
|
|
363
|
+
+typeParameters: $NonMaybeType<ComponentDeclaration['typeParameters']>;
|
|
364
|
+
}
|
|
365
|
+
interface ComponentDeclaration_With_returnType extends ComponentDeclaration {
|
|
366
|
+
+returnType: $NonMaybeType<ComponentDeclaration['returnType']>;
|
|
367
|
+
}
|
|
368
|
+
interface ComponentParameter_With_name extends ComponentParameter {
|
|
369
|
+
+name: $NonMaybeType<ComponentParameter['name']>;
|
|
370
|
+
}
|
|
371
|
+
interface ComponentParameter_With_local extends ComponentParameter {
|
|
372
|
+
+local: $NonMaybeType<ComponentParameter['local']>;
|
|
373
|
+
}
|
|
374
|
+
interface ComponentParameter_With_shorthand extends ComponentParameter {
|
|
375
|
+
+shorthand: $NonMaybeType<ComponentParameter['shorthand']>;
|
|
376
|
+
}
|
|
377
|
+
interface ComponentTypeAnnotation_With_params extends ComponentTypeAnnotation {
|
|
378
|
+
+params: $NonMaybeType<ComponentTypeAnnotation['params']>;
|
|
379
|
+
}
|
|
380
|
+
interface ComponentTypeAnnotation_With_rest extends ComponentTypeAnnotation {
|
|
381
|
+
+rest: $NonMaybeType<ComponentTypeAnnotation['rest']>;
|
|
382
|
+
}
|
|
383
|
+
interface ComponentTypeAnnotation_With_typeParameters
|
|
384
|
+
extends ComponentTypeAnnotation {
|
|
385
|
+
+typeParameters: $NonMaybeType<ComponentTypeAnnotation['typeParameters']>;
|
|
386
|
+
}
|
|
387
|
+
interface ComponentTypeAnnotation_With_returnType
|
|
388
|
+
extends ComponentTypeAnnotation {
|
|
389
|
+
+returnType: $NonMaybeType<ComponentTypeAnnotation['returnType']>;
|
|
390
|
+
}
|
|
391
|
+
interface ComponentTypeParameter_With_name extends ComponentTypeParameter {
|
|
392
|
+
+name: $NonMaybeType<ComponentTypeParameter['name']>;
|
|
393
|
+
}
|
|
394
|
+
interface ComponentTypeParameter_With_typeAnnotation
|
|
395
|
+
extends ComponentTypeParameter {
|
|
396
|
+
+typeAnnotation: $NonMaybeType<ComponentTypeParameter['typeAnnotation']>;
|
|
397
|
+
}
|
|
398
|
+
interface ComponentTypeParameter_With_optional extends ComponentTypeParameter {
|
|
399
|
+
+optional: $NonMaybeType<ComponentTypeParameter['optional']>;
|
|
400
|
+
}
|
|
338
401
|
interface ConditionalExpression_With_test extends ConditionalExpression {
|
|
339
402
|
+test: $NonMaybeType<ConditionalExpression['test']>;
|
|
340
403
|
}
|
|
@@ -344,6 +407,22 @@ interface ConditionalExpression_With_alternate extends ConditionalExpression {
|
|
|
344
407
|
interface ConditionalExpression_With_consequent extends ConditionalExpression {
|
|
345
408
|
+consequent: $NonMaybeType<ConditionalExpression['consequent']>;
|
|
346
409
|
}
|
|
410
|
+
interface ConditionalTypeAnnotation_With_checkType
|
|
411
|
+
extends ConditionalTypeAnnotation {
|
|
412
|
+
+checkType: $NonMaybeType<ConditionalTypeAnnotation['checkType']>;
|
|
413
|
+
}
|
|
414
|
+
interface ConditionalTypeAnnotation_With_extendsType
|
|
415
|
+
extends ConditionalTypeAnnotation {
|
|
416
|
+
+extendsType: $NonMaybeType<ConditionalTypeAnnotation['extendsType']>;
|
|
417
|
+
}
|
|
418
|
+
interface ConditionalTypeAnnotation_With_trueType
|
|
419
|
+
extends ConditionalTypeAnnotation {
|
|
420
|
+
+trueType: $NonMaybeType<ConditionalTypeAnnotation['trueType']>;
|
|
421
|
+
}
|
|
422
|
+
interface ConditionalTypeAnnotation_With_falseType
|
|
423
|
+
extends ConditionalTypeAnnotation {
|
|
424
|
+
+falseType: $NonMaybeType<ConditionalTypeAnnotation['falseType']>;
|
|
425
|
+
}
|
|
347
426
|
interface ContinueStatement_With_label extends ContinueStatement {
|
|
348
427
|
+label: $NonMaybeType<ContinueStatement['label']>;
|
|
349
428
|
}
|
|
@@ -365,9 +444,30 @@ interface DeclareClass_With_mixins extends DeclareClass {
|
|
|
365
444
|
interface DeclareClass_With_body extends DeclareClass {
|
|
366
445
|
+body: $NonMaybeType<DeclareClass['body']>;
|
|
367
446
|
}
|
|
447
|
+
interface DeclareComponent_With_id extends DeclareComponent {
|
|
448
|
+
+id: $NonMaybeType<DeclareComponent['id']>;
|
|
449
|
+
}
|
|
450
|
+
interface DeclareComponent_With_params extends DeclareComponent {
|
|
451
|
+
+params: $NonMaybeType<DeclareComponent['params']>;
|
|
452
|
+
}
|
|
453
|
+
interface DeclareComponent_With_rest extends DeclareComponent {
|
|
454
|
+
+rest: $NonMaybeType<DeclareComponent['rest']>;
|
|
455
|
+
}
|
|
456
|
+
interface DeclareComponent_With_typeParameters extends DeclareComponent {
|
|
457
|
+
+typeParameters: $NonMaybeType<DeclareComponent['typeParameters']>;
|
|
458
|
+
}
|
|
459
|
+
interface DeclareComponent_With_returnType extends DeclareComponent {
|
|
460
|
+
+returnType: $NonMaybeType<DeclareComponent['returnType']>;
|
|
461
|
+
}
|
|
368
462
|
interface DeclaredPredicate_With_value extends DeclaredPredicate {
|
|
369
463
|
+value: $NonMaybeType<DeclaredPredicate['value']>;
|
|
370
464
|
}
|
|
465
|
+
interface DeclareEnum_With_id extends DeclareEnum {
|
|
466
|
+
+id: $NonMaybeType<DeclareEnum['id']>;
|
|
467
|
+
}
|
|
468
|
+
interface DeclareEnum_With_body extends DeclareEnum {
|
|
469
|
+
+body: $NonMaybeType<DeclareEnum['body']>;
|
|
470
|
+
}
|
|
371
471
|
interface DeclareExportAllDeclaration_With_source
|
|
372
472
|
extends DeclareExportAllDeclaration {
|
|
373
473
|
+source: $NonMaybeType<DeclareExportAllDeclaration['source']>;
|
|
@@ -443,6 +543,9 @@ interface DeclareTypeAlias_With_right extends DeclareTypeAlias {
|
|
|
443
543
|
interface DeclareVariable_With_id extends DeclareVariable {
|
|
444
544
|
+id: $NonMaybeType<DeclareVariable['id']>;
|
|
445
545
|
}
|
|
546
|
+
interface DeclareVariable_With_kind extends DeclareVariable {
|
|
547
|
+
+kind: $NonMaybeType<DeclareVariable['kind']>;
|
|
548
|
+
}
|
|
446
549
|
interface DoWhileStatement_With_body extends DoWhileStatement {
|
|
447
550
|
+body: $NonMaybeType<DoWhileStatement['body']>;
|
|
448
551
|
}
|
|
@@ -726,6 +829,9 @@ interface IndexedAccessType_With_objectType extends IndexedAccessType {
|
|
|
726
829
|
interface IndexedAccessType_With_indexType extends IndexedAccessType {
|
|
727
830
|
+indexType: $NonMaybeType<IndexedAccessType['indexType']>;
|
|
728
831
|
}
|
|
832
|
+
interface InferTypeAnnotation_With_typeParameter extends InferTypeAnnotation {
|
|
833
|
+
+typeParameter: $NonMaybeType<InferTypeAnnotation['typeParameter']>;
|
|
834
|
+
}
|
|
729
835
|
interface InterfaceDeclaration_With_id extends InterfaceDeclaration {
|
|
730
836
|
+id: $NonMaybeType<InterfaceDeclaration['id']>;
|
|
731
837
|
}
|
|
@@ -810,6 +916,9 @@ interface JSXOpeningElement_With_attributes extends JSXOpeningElement {
|
|
|
810
916
|
interface JSXOpeningElement_With_selfClosing extends JSXOpeningElement {
|
|
811
917
|
+selfClosing: $NonMaybeType<JSXOpeningElement['selfClosing']>;
|
|
812
918
|
}
|
|
919
|
+
interface JSXOpeningElement_With_typeArguments extends JSXOpeningElement {
|
|
920
|
+
+typeArguments: $NonMaybeType<JSXOpeningElement['typeArguments']>;
|
|
921
|
+
}
|
|
813
922
|
interface JSXSpreadAttribute_With_argument extends JSXSpreadAttribute {
|
|
814
923
|
+argument: $NonMaybeType<JSXSpreadAttribute['argument']>;
|
|
815
924
|
}
|
|
@@ -822,6 +931,9 @@ interface JSXText_With_value extends JSXText {
|
|
|
822
931
|
interface JSXText_With_raw extends JSXText {
|
|
823
932
|
+raw: $NonMaybeType<JSXText['raw']>;
|
|
824
933
|
}
|
|
934
|
+
interface KeyofTypeAnnotation_With_argument extends KeyofTypeAnnotation {
|
|
935
|
+
+argument: $NonMaybeType<KeyofTypeAnnotation['argument']>;
|
|
936
|
+
}
|
|
825
937
|
interface LabeledStatement_With_label extends LabeledStatement {
|
|
826
938
|
+label: $NonMaybeType<LabeledStatement['label']>;
|
|
827
939
|
}
|
|
@@ -952,6 +1064,26 @@ interface ObjectTypeInternalSlot_With_static extends ObjectTypeInternalSlot {
|
|
|
952
1064
|
interface ObjectTypeInternalSlot_With_method extends ObjectTypeInternalSlot {
|
|
953
1065
|
+method: $NonMaybeType<ObjectTypeInternalSlot['method']>;
|
|
954
1066
|
}
|
|
1067
|
+
interface ObjectTypeMappedTypeProperty_With_keyTparam
|
|
1068
|
+
extends ObjectTypeMappedTypeProperty {
|
|
1069
|
+
+keyTparam: $NonMaybeType<ObjectTypeMappedTypeProperty['keyTparam']>;
|
|
1070
|
+
}
|
|
1071
|
+
interface ObjectTypeMappedTypeProperty_With_propType
|
|
1072
|
+
extends ObjectTypeMappedTypeProperty {
|
|
1073
|
+
+propType: $NonMaybeType<ObjectTypeMappedTypeProperty['propType']>;
|
|
1074
|
+
}
|
|
1075
|
+
interface ObjectTypeMappedTypeProperty_With_sourceType
|
|
1076
|
+
extends ObjectTypeMappedTypeProperty {
|
|
1077
|
+
+sourceType: $NonMaybeType<ObjectTypeMappedTypeProperty['sourceType']>;
|
|
1078
|
+
}
|
|
1079
|
+
interface ObjectTypeMappedTypeProperty_With_variance
|
|
1080
|
+
extends ObjectTypeMappedTypeProperty {
|
|
1081
|
+
+variance: $NonMaybeType<ObjectTypeMappedTypeProperty['variance']>;
|
|
1082
|
+
}
|
|
1083
|
+
interface ObjectTypeMappedTypeProperty_With_optional
|
|
1084
|
+
extends ObjectTypeMappedTypeProperty {
|
|
1085
|
+
+optional: $NonMaybeType<ObjectTypeMappedTypeProperty['optional']>;
|
|
1086
|
+
}
|
|
955
1087
|
interface ObjectTypeProperty_With_key extends ObjectTypeProperty {
|
|
956
1088
|
+key: $NonMaybeType<ObjectTypeProperty['key']>;
|
|
957
1089
|
}
|
|
@@ -1062,6 +1194,13 @@ interface QualifiedTypeIdentifier_With_qualification
|
|
|
1062
1194
|
interface QualifiedTypeIdentifier_With_id extends QualifiedTypeIdentifier {
|
|
1063
1195
|
+id: $NonMaybeType<QualifiedTypeIdentifier['id']>;
|
|
1064
1196
|
}
|
|
1197
|
+
interface QualifiedTypeofIdentifier_With_qualification
|
|
1198
|
+
extends QualifiedTypeofIdentifier {
|
|
1199
|
+
+qualification: $NonMaybeType<QualifiedTypeofIdentifier['qualification']>;
|
|
1200
|
+
}
|
|
1201
|
+
interface QualifiedTypeofIdentifier_With_id extends QualifiedTypeofIdentifier {
|
|
1202
|
+
+id: $NonMaybeType<QualifiedTypeofIdentifier['id']>;
|
|
1203
|
+
}
|
|
1065
1204
|
interface RestElement_With_argument extends RestElement {
|
|
1066
1205
|
+argument: $NonMaybeType<RestElement['argument']>;
|
|
1067
1206
|
}
|
|
@@ -1130,6 +1269,28 @@ interface TryStatement_With_finalizer extends TryStatement {
|
|
|
1130
1269
|
interface TupleTypeAnnotation_With_types extends TupleTypeAnnotation {
|
|
1131
1270
|
+types: $NonMaybeType<TupleTypeAnnotation['types']>;
|
|
1132
1271
|
}
|
|
1272
|
+
interface TupleTypeLabeledElement_With_label extends TupleTypeLabeledElement {
|
|
1273
|
+
+label: $NonMaybeType<TupleTypeLabeledElement['label']>;
|
|
1274
|
+
}
|
|
1275
|
+
interface TupleTypeLabeledElement_With_elementType
|
|
1276
|
+
extends TupleTypeLabeledElement {
|
|
1277
|
+
+elementType: $NonMaybeType<TupleTypeLabeledElement['elementType']>;
|
|
1278
|
+
}
|
|
1279
|
+
interface TupleTypeLabeledElement_With_optional
|
|
1280
|
+
extends TupleTypeLabeledElement {
|
|
1281
|
+
+optional: $NonMaybeType<TupleTypeLabeledElement['optional']>;
|
|
1282
|
+
}
|
|
1283
|
+
interface TupleTypeLabeledElement_With_variance
|
|
1284
|
+
extends TupleTypeLabeledElement {
|
|
1285
|
+
+variance: $NonMaybeType<TupleTypeLabeledElement['variance']>;
|
|
1286
|
+
}
|
|
1287
|
+
interface TupleTypeSpreadElement_With_label extends TupleTypeSpreadElement {
|
|
1288
|
+
+label: $NonMaybeType<TupleTypeSpreadElement['label']>;
|
|
1289
|
+
}
|
|
1290
|
+
interface TupleTypeSpreadElement_With_typeAnnotation
|
|
1291
|
+
extends TupleTypeSpreadElement {
|
|
1292
|
+
+typeAnnotation: $NonMaybeType<TupleTypeSpreadElement['typeAnnotation']>;
|
|
1293
|
+
}
|
|
1133
1294
|
interface TypeAlias_With_id extends TypeAlias {
|
|
1134
1295
|
+id: $NonMaybeType<TypeAlias['id']>;
|
|
1135
1296
|
}
|
|
@@ -1171,6 +1332,15 @@ interface TypeParameterInstantiation_With_params
|
|
|
1171
1332
|
extends TypeParameterInstantiation {
|
|
1172
1333
|
+params: $NonMaybeType<TypeParameterInstantiation['params']>;
|
|
1173
1334
|
}
|
|
1335
|
+
interface TypePredicate_With_parameterName extends TypePredicate {
|
|
1336
|
+
+parameterName: $NonMaybeType<TypePredicate['parameterName']>;
|
|
1337
|
+
}
|
|
1338
|
+
interface TypePredicate_With_typeAnnotation extends TypePredicate {
|
|
1339
|
+
+typeAnnotation: $NonMaybeType<TypePredicate['typeAnnotation']>;
|
|
1340
|
+
}
|
|
1341
|
+
interface TypePredicate_With_asserts extends TypePredicate {
|
|
1342
|
+
+asserts: $NonMaybeType<TypePredicate['asserts']>;
|
|
1343
|
+
}
|
|
1174
1344
|
interface UnaryExpression_With_operator extends UnaryExpression {
|
|
1175
1345
|
+operator: $NonMaybeType<UnaryExpression['operator']>;
|
|
1176
1346
|
}
|
|
@@ -1247,6 +1417,7 @@ type StatementSpecialSelector =
|
|
|
1247
1417
|
| WithStatement;
|
|
1248
1418
|
type DeclarationSpecialSelector =
|
|
1249
1419
|
| ClassDeclaration
|
|
1420
|
+
| ComponentDeclaration
|
|
1250
1421
|
| DeclareExportAllDeclaration
|
|
1251
1422
|
| DeclareExportDeclaration
|
|
1252
1423
|
| EnumDeclaration
|
|
@@ -1427,6 +1598,49 @@ export type ESQueryNodeSelectorsWithoutFallback = {
|
|
|
1427
1598
|
+'ClassImplements[typeParameters]'?: (
|
|
1428
1599
|
node: ClassImplements_With_typeParameters,
|
|
1429
1600
|
) => void,
|
|
1601
|
+
+ComponentDeclaration?: (node: ComponentDeclaration) => void,
|
|
1602
|
+
+'ComponentDeclaration[id]'?: (node: ComponentDeclaration_With_id) => void,
|
|
1603
|
+
+'ComponentDeclaration[params]'?: (
|
|
1604
|
+
node: ComponentDeclaration_With_params,
|
|
1605
|
+
) => void,
|
|
1606
|
+
+'ComponentDeclaration[body]'?: (
|
|
1607
|
+
node: ComponentDeclaration_With_body,
|
|
1608
|
+
) => void,
|
|
1609
|
+
+'ComponentDeclaration[typeParameters]'?: (
|
|
1610
|
+
node: ComponentDeclaration_With_typeParameters,
|
|
1611
|
+
) => void,
|
|
1612
|
+
+'ComponentDeclaration[returnType]'?: (
|
|
1613
|
+
node: ComponentDeclaration_With_returnType,
|
|
1614
|
+
) => void,
|
|
1615
|
+
+ComponentParameter?: (node: ComponentParameter) => void,
|
|
1616
|
+
+'ComponentParameter[name]'?: (node: ComponentParameter_With_name) => void,
|
|
1617
|
+
+'ComponentParameter[local]'?: (node: ComponentParameter_With_local) => void,
|
|
1618
|
+
+'ComponentParameter[shorthand]'?: (
|
|
1619
|
+
node: ComponentParameter_With_shorthand,
|
|
1620
|
+
) => void,
|
|
1621
|
+
+ComponentTypeAnnotation?: (node: ComponentTypeAnnotation) => void,
|
|
1622
|
+
+'ComponentTypeAnnotation[params]'?: (
|
|
1623
|
+
node: ComponentTypeAnnotation_With_params,
|
|
1624
|
+
) => void,
|
|
1625
|
+
+'ComponentTypeAnnotation[rest]'?: (
|
|
1626
|
+
node: ComponentTypeAnnotation_With_rest,
|
|
1627
|
+
) => void,
|
|
1628
|
+
+'ComponentTypeAnnotation[typeParameters]'?: (
|
|
1629
|
+
node: ComponentTypeAnnotation_With_typeParameters,
|
|
1630
|
+
) => void,
|
|
1631
|
+
+'ComponentTypeAnnotation[returnType]'?: (
|
|
1632
|
+
node: ComponentTypeAnnotation_With_returnType,
|
|
1633
|
+
) => void,
|
|
1634
|
+
+ComponentTypeParameter?: (node: ComponentTypeParameter) => void,
|
|
1635
|
+
+'ComponentTypeParameter[name]'?: (
|
|
1636
|
+
node: ComponentTypeParameter_With_name,
|
|
1637
|
+
) => void,
|
|
1638
|
+
+'ComponentTypeParameter[typeAnnotation]'?: (
|
|
1639
|
+
node: ComponentTypeParameter_With_typeAnnotation,
|
|
1640
|
+
) => void,
|
|
1641
|
+
+'ComponentTypeParameter[optional]'?: (
|
|
1642
|
+
node: ComponentTypeParameter_With_optional,
|
|
1643
|
+
) => void,
|
|
1430
1644
|
+ConditionalExpression?: (node: ConditionalExpression) => void,
|
|
1431
1645
|
+'ConditionalExpression[test]'?: (
|
|
1432
1646
|
node: ConditionalExpression_With_test,
|
|
@@ -1437,6 +1651,19 @@ export type ESQueryNodeSelectorsWithoutFallback = {
|
|
|
1437
1651
|
+'ConditionalExpression[consequent]'?: (
|
|
1438
1652
|
node: ConditionalExpression_With_consequent,
|
|
1439
1653
|
) => void,
|
|
1654
|
+
+ConditionalTypeAnnotation?: (node: ConditionalTypeAnnotation) => void,
|
|
1655
|
+
+'ConditionalTypeAnnotation[checkType]'?: (
|
|
1656
|
+
node: ConditionalTypeAnnotation_With_checkType,
|
|
1657
|
+
) => void,
|
|
1658
|
+
+'ConditionalTypeAnnotation[extendsType]'?: (
|
|
1659
|
+
node: ConditionalTypeAnnotation_With_extendsType,
|
|
1660
|
+
) => void,
|
|
1661
|
+
+'ConditionalTypeAnnotation[trueType]'?: (
|
|
1662
|
+
node: ConditionalTypeAnnotation_With_trueType,
|
|
1663
|
+
) => void,
|
|
1664
|
+
+'ConditionalTypeAnnotation[falseType]'?: (
|
|
1665
|
+
node: ConditionalTypeAnnotation_With_falseType,
|
|
1666
|
+
) => void,
|
|
1440
1667
|
+ContinueStatement?: (node: ContinueStatement) => void,
|
|
1441
1668
|
+'ContinueStatement[label]'?: (node: ContinueStatement_With_label) => void,
|
|
1442
1669
|
+DebuggerStatement?: (node: DebuggerStatement) => void,
|
|
@@ -1449,8 +1676,21 @@ export type ESQueryNodeSelectorsWithoutFallback = {
|
|
|
1449
1676
|
+'DeclareClass[implements]'?: (node: DeclareClass_With_implements) => void,
|
|
1450
1677
|
+'DeclareClass[mixins]'?: (node: DeclareClass_With_mixins) => void,
|
|
1451
1678
|
+'DeclareClass[body]'?: (node: DeclareClass_With_body) => void,
|
|
1679
|
+
+DeclareComponent?: (node: DeclareComponent) => void,
|
|
1680
|
+
+'DeclareComponent[id]'?: (node: DeclareComponent_With_id) => void,
|
|
1681
|
+
+'DeclareComponent[params]'?: (node: DeclareComponent_With_params) => void,
|
|
1682
|
+
+'DeclareComponent[rest]'?: (node: DeclareComponent_With_rest) => void,
|
|
1683
|
+
+'DeclareComponent[typeParameters]'?: (
|
|
1684
|
+
node: DeclareComponent_With_typeParameters,
|
|
1685
|
+
) => void,
|
|
1686
|
+
+'DeclareComponent[returnType]'?: (
|
|
1687
|
+
node: DeclareComponent_With_returnType,
|
|
1688
|
+
) => void,
|
|
1452
1689
|
+DeclaredPredicate?: (node: DeclaredPredicate) => void,
|
|
1453
1690
|
+'DeclaredPredicate[value]'?: (node: DeclaredPredicate_With_value) => void,
|
|
1691
|
+
+DeclareEnum?: (node: DeclareEnum) => void,
|
|
1692
|
+
+'DeclareEnum[id]'?: (node: DeclareEnum_With_id) => void,
|
|
1693
|
+
+'DeclareEnum[body]'?: (node: DeclareEnum_With_body) => void,
|
|
1454
1694
|
+DeclareExportAllDeclaration?: (node: DeclareExportAllDeclaration) => void,
|
|
1455
1695
|
+'DeclareExportAllDeclaration[source]'?: (
|
|
1456
1696
|
node: DeclareExportAllDeclaration_With_source,
|
|
@@ -1507,6 +1747,7 @@ export type ESQueryNodeSelectorsWithoutFallback = {
|
|
|
1507
1747
|
+'DeclareTypeAlias[right]'?: (node: DeclareTypeAlias_With_right) => void,
|
|
1508
1748
|
+DeclareVariable?: (node: DeclareVariable) => void,
|
|
1509
1749
|
+'DeclareVariable[id]'?: (node: DeclareVariable_With_id) => void,
|
|
1750
|
+
+'DeclareVariable[kind]'?: (node: DeclareVariable_With_kind) => void,
|
|
1510
1751
|
+DoWhileStatement?: (node: DoWhileStatement) => void,
|
|
1511
1752
|
+'DoWhileStatement[body]'?: (node: DoWhileStatement_With_body) => void,
|
|
1512
1753
|
+'DoWhileStatement[test]'?: (node: DoWhileStatement_With_test) => void,
|
|
@@ -1727,6 +1968,10 @@ export type ESQueryNodeSelectorsWithoutFallback = {
|
|
|
1727
1968
|
node: IndexedAccessType_With_indexType,
|
|
1728
1969
|
) => void,
|
|
1729
1970
|
+InferredPredicate?: (node: InferredPredicate) => void,
|
|
1971
|
+
+InferTypeAnnotation?: (node: InferTypeAnnotation) => void,
|
|
1972
|
+
+'InferTypeAnnotation[typeParameter]'?: (
|
|
1973
|
+
node: InferTypeAnnotation_With_typeParameter,
|
|
1974
|
+
) => void,
|
|
1730
1975
|
+InterfaceDeclaration?: (node: InterfaceDeclaration) => void,
|
|
1731
1976
|
+'InterfaceDeclaration[id]'?: (node: InterfaceDeclaration_With_id) => void,
|
|
1732
1977
|
+'InterfaceDeclaration[typeParameters]'?: (
|
|
@@ -1803,6 +2048,9 @@ export type ESQueryNodeSelectorsWithoutFallback = {
|
|
|
1803
2048
|
+'JSXOpeningElement[selfClosing]'?: (
|
|
1804
2049
|
node: JSXOpeningElement_With_selfClosing,
|
|
1805
2050
|
) => void,
|
|
2051
|
+
+'JSXOpeningElement[typeArguments]'?: (
|
|
2052
|
+
node: JSXOpeningElement_With_typeArguments,
|
|
2053
|
+
) => void,
|
|
1806
2054
|
+JSXOpeningFragment?: (node: JSXOpeningFragment) => void,
|
|
1807
2055
|
+JSXSpreadAttribute?: (node: JSXSpreadAttribute) => void,
|
|
1808
2056
|
+'JSXSpreadAttribute[argument]'?: (
|
|
@@ -1815,6 +2063,10 @@ export type ESQueryNodeSelectorsWithoutFallback = {
|
|
|
1815
2063
|
+JSXText?: (node: JSXText) => void,
|
|
1816
2064
|
+'JSXText[value]'?: (node: JSXText_With_value) => void,
|
|
1817
2065
|
+'JSXText[raw]'?: (node: JSXText_With_raw) => void,
|
|
2066
|
+
+KeyofTypeAnnotation?: (node: KeyofTypeAnnotation) => void,
|
|
2067
|
+
+'KeyofTypeAnnotation[argument]'?: (
|
|
2068
|
+
node: KeyofTypeAnnotation_With_argument,
|
|
2069
|
+
) => void,
|
|
1818
2070
|
+LabeledStatement?: (node: LabeledStatement) => void,
|
|
1819
2071
|
+'LabeledStatement[label]'?: (node: LabeledStatement_With_label) => void,
|
|
1820
2072
|
+'LabeledStatement[body]'?: (node: LabeledStatement_With_body) => void,
|
|
@@ -1922,6 +2174,22 @@ export type ESQueryNodeSelectorsWithoutFallback = {
|
|
|
1922
2174
|
+'ObjectTypeInternalSlot[method]'?: (
|
|
1923
2175
|
node: ObjectTypeInternalSlot_With_method,
|
|
1924
2176
|
) => void,
|
|
2177
|
+
+ObjectTypeMappedTypeProperty?: (node: ObjectTypeMappedTypeProperty) => void,
|
|
2178
|
+
+'ObjectTypeMappedTypeProperty[keyTparam]'?: (
|
|
2179
|
+
node: ObjectTypeMappedTypeProperty_With_keyTparam,
|
|
2180
|
+
) => void,
|
|
2181
|
+
+'ObjectTypeMappedTypeProperty[propType]'?: (
|
|
2182
|
+
node: ObjectTypeMappedTypeProperty_With_propType,
|
|
2183
|
+
) => void,
|
|
2184
|
+
+'ObjectTypeMappedTypeProperty[sourceType]'?: (
|
|
2185
|
+
node: ObjectTypeMappedTypeProperty_With_sourceType,
|
|
2186
|
+
) => void,
|
|
2187
|
+
+'ObjectTypeMappedTypeProperty[variance]'?: (
|
|
2188
|
+
node: ObjectTypeMappedTypeProperty_With_variance,
|
|
2189
|
+
) => void,
|
|
2190
|
+
+'ObjectTypeMappedTypeProperty[optional]'?: (
|
|
2191
|
+
node: ObjectTypeMappedTypeProperty_With_optional,
|
|
2192
|
+
) => void,
|
|
1925
2193
|
+ObjectTypeProperty?: (node: ObjectTypeProperty) => void,
|
|
1926
2194
|
+'ObjectTypeProperty[key]'?: (node: ObjectTypeProperty_With_key) => void,
|
|
1927
2195
|
+'ObjectTypeProperty[value]'?: (node: ObjectTypeProperty_With_value) => void,
|
|
@@ -2002,6 +2270,13 @@ export type ESQueryNodeSelectorsWithoutFallback = {
|
|
|
2002
2270
|
+'QualifiedTypeIdentifier[id]'?: (
|
|
2003
2271
|
node: QualifiedTypeIdentifier_With_id,
|
|
2004
2272
|
) => void,
|
|
2273
|
+
+QualifiedTypeofIdentifier?: (node: QualifiedTypeofIdentifier) => void,
|
|
2274
|
+
+'QualifiedTypeofIdentifier[qualification]'?: (
|
|
2275
|
+
node: QualifiedTypeofIdentifier_With_qualification,
|
|
2276
|
+
) => void,
|
|
2277
|
+
+'QualifiedTypeofIdentifier[id]'?: (
|
|
2278
|
+
node: QualifiedTypeofIdentifier_With_id,
|
|
2279
|
+
) => void,
|
|
2005
2280
|
+RestElement?: (node: RestElement) => void,
|
|
2006
2281
|
+'RestElement[argument]'?: (node: RestElement_With_argument) => void,
|
|
2007
2282
|
+ReturnStatement?: (node: ReturnStatement) => void,
|
|
@@ -2058,6 +2333,26 @@ export type ESQueryNodeSelectorsWithoutFallback = {
|
|
|
2058
2333
|
+'TupleTypeAnnotation[types]'?: (
|
|
2059
2334
|
node: TupleTypeAnnotation_With_types,
|
|
2060
2335
|
) => void,
|
|
2336
|
+
+TupleTypeLabeledElement?: (node: TupleTypeLabeledElement) => void,
|
|
2337
|
+
+'TupleTypeLabeledElement[label]'?: (
|
|
2338
|
+
node: TupleTypeLabeledElement_With_label,
|
|
2339
|
+
) => void,
|
|
2340
|
+
+'TupleTypeLabeledElement[elementType]'?: (
|
|
2341
|
+
node: TupleTypeLabeledElement_With_elementType,
|
|
2342
|
+
) => void,
|
|
2343
|
+
+'TupleTypeLabeledElement[optional]'?: (
|
|
2344
|
+
node: TupleTypeLabeledElement_With_optional,
|
|
2345
|
+
) => void,
|
|
2346
|
+
+'TupleTypeLabeledElement[variance]'?: (
|
|
2347
|
+
node: TupleTypeLabeledElement_With_variance,
|
|
2348
|
+
) => void,
|
|
2349
|
+
+TupleTypeSpreadElement?: (node: TupleTypeSpreadElement) => void,
|
|
2350
|
+
+'TupleTypeSpreadElement[label]'?: (
|
|
2351
|
+
node: TupleTypeSpreadElement_With_label,
|
|
2352
|
+
) => void,
|
|
2353
|
+
+'TupleTypeSpreadElement[typeAnnotation]'?: (
|
|
2354
|
+
node: TupleTypeSpreadElement_With_typeAnnotation,
|
|
2355
|
+
) => void,
|
|
2061
2356
|
+TypeAlias?: (node: TypeAlias) => void,
|
|
2062
2357
|
+'TypeAlias[id]'?: (node: TypeAlias_With_id) => void,
|
|
2063
2358
|
+'TypeAlias[typeParameters]'?: (node: TypeAlias_With_typeParameters) => void,
|
|
@@ -2090,6 +2385,14 @@ export type ESQueryNodeSelectorsWithoutFallback = {
|
|
|
2090
2385
|
+'TypeParameterInstantiation[params]'?: (
|
|
2091
2386
|
node: TypeParameterInstantiation_With_params,
|
|
2092
2387
|
) => void,
|
|
2388
|
+
+TypePredicate?: (node: TypePredicate) => void,
|
|
2389
|
+
+'TypePredicate[parameterName]'?: (
|
|
2390
|
+
node: TypePredicate_With_parameterName,
|
|
2391
|
+
) => void,
|
|
2392
|
+
+'TypePredicate[typeAnnotation]'?: (
|
|
2393
|
+
node: TypePredicate_With_typeAnnotation,
|
|
2394
|
+
) => void,
|
|
2395
|
+
+'TypePredicate[asserts]'?: (node: TypePredicate_With_asserts) => void,
|
|
2093
2396
|
+UnaryExpression?: (node: UnaryExpression) => void,
|
|
2094
2397
|
+'UnaryExpression[operator]'?: (node: UnaryExpression_With_operator) => void,
|
|
2095
2398
|
+'UnaryExpression[argument]'?: (node: UnaryExpression_With_argument) => void,
|
|
@@ -2279,6 +2582,55 @@ export type ESQueryNodeSelectorsWithoutFallback = {
|
|
|
2279
2582
|
+'ClassImplements[typeParameters]:exit'?: (
|
|
2280
2583
|
node: ClassImplements_With_typeParameters,
|
|
2281
2584
|
) => void,
|
|
2585
|
+
+'ComponentDeclaration:exit'?: (node: ComponentDeclaration) => void,
|
|
2586
|
+
+'ComponentDeclaration[id]:exit'?: (
|
|
2587
|
+
node: ComponentDeclaration_With_id,
|
|
2588
|
+
) => void,
|
|
2589
|
+
+'ComponentDeclaration[params]:exit'?: (
|
|
2590
|
+
node: ComponentDeclaration_With_params,
|
|
2591
|
+
) => void,
|
|
2592
|
+
+'ComponentDeclaration[body]:exit'?: (
|
|
2593
|
+
node: ComponentDeclaration_With_body,
|
|
2594
|
+
) => void,
|
|
2595
|
+
+'ComponentDeclaration[typeParameters]:exit'?: (
|
|
2596
|
+
node: ComponentDeclaration_With_typeParameters,
|
|
2597
|
+
) => void,
|
|
2598
|
+
+'ComponentDeclaration[returnType]:exit'?: (
|
|
2599
|
+
node: ComponentDeclaration_With_returnType,
|
|
2600
|
+
) => void,
|
|
2601
|
+
+'ComponentParameter:exit'?: (node: ComponentParameter) => void,
|
|
2602
|
+
+'ComponentParameter[name]:exit'?: (
|
|
2603
|
+
node: ComponentParameter_With_name,
|
|
2604
|
+
) => void,
|
|
2605
|
+
+'ComponentParameter[local]:exit'?: (
|
|
2606
|
+
node: ComponentParameter_With_local,
|
|
2607
|
+
) => void,
|
|
2608
|
+
+'ComponentParameter[shorthand]:exit'?: (
|
|
2609
|
+
node: ComponentParameter_With_shorthand,
|
|
2610
|
+
) => void,
|
|
2611
|
+
+'ComponentTypeAnnotation:exit'?: (node: ComponentTypeAnnotation) => void,
|
|
2612
|
+
+'ComponentTypeAnnotation[params]:exit'?: (
|
|
2613
|
+
node: ComponentTypeAnnotation_With_params,
|
|
2614
|
+
) => void,
|
|
2615
|
+
+'ComponentTypeAnnotation[rest]:exit'?: (
|
|
2616
|
+
node: ComponentTypeAnnotation_With_rest,
|
|
2617
|
+
) => void,
|
|
2618
|
+
+'ComponentTypeAnnotation[typeParameters]:exit'?: (
|
|
2619
|
+
node: ComponentTypeAnnotation_With_typeParameters,
|
|
2620
|
+
) => void,
|
|
2621
|
+
+'ComponentTypeAnnotation[returnType]:exit'?: (
|
|
2622
|
+
node: ComponentTypeAnnotation_With_returnType,
|
|
2623
|
+
) => void,
|
|
2624
|
+
+'ComponentTypeParameter:exit'?: (node: ComponentTypeParameter) => void,
|
|
2625
|
+
+'ComponentTypeParameter[name]:exit'?: (
|
|
2626
|
+
node: ComponentTypeParameter_With_name,
|
|
2627
|
+
) => void,
|
|
2628
|
+
+'ComponentTypeParameter[typeAnnotation]:exit'?: (
|
|
2629
|
+
node: ComponentTypeParameter_With_typeAnnotation,
|
|
2630
|
+
) => void,
|
|
2631
|
+
+'ComponentTypeParameter[optional]:exit'?: (
|
|
2632
|
+
node: ComponentTypeParameter_With_optional,
|
|
2633
|
+
) => void,
|
|
2282
2634
|
+'ConditionalExpression:exit'?: (node: ConditionalExpression) => void,
|
|
2283
2635
|
+'ConditionalExpression[test]:exit'?: (
|
|
2284
2636
|
node: ConditionalExpression_With_test,
|
|
@@ -2289,6 +2641,19 @@ export type ESQueryNodeSelectorsWithoutFallback = {
|
|
|
2289
2641
|
+'ConditionalExpression[consequent]:exit'?: (
|
|
2290
2642
|
node: ConditionalExpression_With_consequent,
|
|
2291
2643
|
) => void,
|
|
2644
|
+
+'ConditionalTypeAnnotation:exit'?: (node: ConditionalTypeAnnotation) => void,
|
|
2645
|
+
+'ConditionalTypeAnnotation[checkType]:exit'?: (
|
|
2646
|
+
node: ConditionalTypeAnnotation_With_checkType,
|
|
2647
|
+
) => void,
|
|
2648
|
+
+'ConditionalTypeAnnotation[extendsType]:exit'?: (
|
|
2649
|
+
node: ConditionalTypeAnnotation_With_extendsType,
|
|
2650
|
+
) => void,
|
|
2651
|
+
+'ConditionalTypeAnnotation[trueType]:exit'?: (
|
|
2652
|
+
node: ConditionalTypeAnnotation_With_trueType,
|
|
2653
|
+
) => void,
|
|
2654
|
+
+'ConditionalTypeAnnotation[falseType]:exit'?: (
|
|
2655
|
+
node: ConditionalTypeAnnotation_With_falseType,
|
|
2656
|
+
) => void,
|
|
2292
2657
|
+'ContinueStatement:exit'?: (node: ContinueStatement) => void,
|
|
2293
2658
|
+'ContinueStatement[label]:exit'?: (
|
|
2294
2659
|
node: ContinueStatement_With_label,
|
|
@@ -2305,10 +2670,25 @@ export type ESQueryNodeSelectorsWithoutFallback = {
|
|
|
2305
2670
|
) => void,
|
|
2306
2671
|
+'DeclareClass[mixins]:exit'?: (node: DeclareClass_With_mixins) => void,
|
|
2307
2672
|
+'DeclareClass[body]:exit'?: (node: DeclareClass_With_body) => void,
|
|
2673
|
+
+'DeclareComponent:exit'?: (node: DeclareComponent) => void,
|
|
2674
|
+
+'DeclareComponent[id]:exit'?: (node: DeclareComponent_With_id) => void,
|
|
2675
|
+
+'DeclareComponent[params]:exit'?: (
|
|
2676
|
+
node: DeclareComponent_With_params,
|
|
2677
|
+
) => void,
|
|
2678
|
+
+'DeclareComponent[rest]:exit'?: (node: DeclareComponent_With_rest) => void,
|
|
2679
|
+
+'DeclareComponent[typeParameters]:exit'?: (
|
|
2680
|
+
node: DeclareComponent_With_typeParameters,
|
|
2681
|
+
) => void,
|
|
2682
|
+
+'DeclareComponent[returnType]:exit'?: (
|
|
2683
|
+
node: DeclareComponent_With_returnType,
|
|
2684
|
+
) => void,
|
|
2308
2685
|
+'DeclaredPredicate:exit'?: (node: DeclaredPredicate) => void,
|
|
2309
2686
|
+'DeclaredPredicate[value]:exit'?: (
|
|
2310
2687
|
node: DeclaredPredicate_With_value,
|
|
2311
2688
|
) => void,
|
|
2689
|
+
+'DeclareEnum:exit'?: (node: DeclareEnum) => void,
|
|
2690
|
+
+'DeclareEnum[id]:exit'?: (node: DeclareEnum_With_id) => void,
|
|
2691
|
+
+'DeclareEnum[body]:exit'?: (node: DeclareEnum_With_body) => void,
|
|
2312
2692
|
+'DeclareExportAllDeclaration:exit'?: (
|
|
2313
2693
|
node: DeclareExportAllDeclaration,
|
|
2314
2694
|
) => void,
|
|
@@ -2369,6 +2749,7 @@ export type ESQueryNodeSelectorsWithoutFallback = {
|
|
|
2369
2749
|
+'DeclareTypeAlias[right]:exit'?: (node: DeclareTypeAlias_With_right) => void,
|
|
2370
2750
|
+'DeclareVariable:exit'?: (node: DeclareVariable) => void,
|
|
2371
2751
|
+'DeclareVariable[id]:exit'?: (node: DeclareVariable_With_id) => void,
|
|
2752
|
+
+'DeclareVariable[kind]:exit'?: (node: DeclareVariable_With_kind) => void,
|
|
2372
2753
|
+'DoWhileStatement:exit'?: (node: DoWhileStatement) => void,
|
|
2373
2754
|
+'DoWhileStatement[body]:exit'?: (node: DoWhileStatement_With_body) => void,
|
|
2374
2755
|
+'DoWhileStatement[test]:exit'?: (node: DoWhileStatement_With_test) => void,
|
|
@@ -2607,6 +2988,10 @@ export type ESQueryNodeSelectorsWithoutFallback = {
|
|
|
2607
2988
|
node: IndexedAccessType_With_indexType,
|
|
2608
2989
|
) => void,
|
|
2609
2990
|
+'InferredPredicate:exit'?: (node: InferredPredicate) => void,
|
|
2991
|
+
+'InferTypeAnnotation:exit'?: (node: InferTypeAnnotation) => void,
|
|
2992
|
+
+'InferTypeAnnotation[typeParameter]:exit'?: (
|
|
2993
|
+
node: InferTypeAnnotation_With_typeParameter,
|
|
2994
|
+
) => void,
|
|
2610
2995
|
+'InterfaceDeclaration:exit'?: (node: InterfaceDeclaration) => void,
|
|
2611
2996
|
+'InterfaceDeclaration[id]:exit'?: (
|
|
2612
2997
|
node: InterfaceDeclaration_With_id,
|
|
@@ -2687,6 +3072,9 @@ export type ESQueryNodeSelectorsWithoutFallback = {
|
|
|
2687
3072
|
+'JSXOpeningElement[selfClosing]:exit'?: (
|
|
2688
3073
|
node: JSXOpeningElement_With_selfClosing,
|
|
2689
3074
|
) => void,
|
|
3075
|
+
+'JSXOpeningElement[typeArguments]:exit'?: (
|
|
3076
|
+
node: JSXOpeningElement_With_typeArguments,
|
|
3077
|
+
) => void,
|
|
2690
3078
|
+'JSXOpeningFragment:exit'?: (node: JSXOpeningFragment) => void,
|
|
2691
3079
|
+'JSXSpreadAttribute:exit'?: (node: JSXSpreadAttribute) => void,
|
|
2692
3080
|
+'JSXSpreadAttribute[argument]:exit'?: (
|
|
@@ -2699,6 +3087,10 @@ export type ESQueryNodeSelectorsWithoutFallback = {
|
|
|
2699
3087
|
+'JSXText:exit'?: (node: JSXText) => void,
|
|
2700
3088
|
+'JSXText[value]:exit'?: (node: JSXText_With_value) => void,
|
|
2701
3089
|
+'JSXText[raw]:exit'?: (node: JSXText_With_raw) => void,
|
|
3090
|
+
+'KeyofTypeAnnotation:exit'?: (node: KeyofTypeAnnotation) => void,
|
|
3091
|
+
+'KeyofTypeAnnotation[argument]:exit'?: (
|
|
3092
|
+
node: KeyofTypeAnnotation_With_argument,
|
|
3093
|
+
) => void,
|
|
2702
3094
|
+'LabeledStatement:exit'?: (node: LabeledStatement) => void,
|
|
2703
3095
|
+'LabeledStatement[label]:exit'?: (node: LabeledStatement_With_label) => void,
|
|
2704
3096
|
+'LabeledStatement[body]:exit'?: (node: LabeledStatement_With_body) => void,
|
|
@@ -2822,6 +3214,24 @@ export type ESQueryNodeSelectorsWithoutFallback = {
|
|
|
2822
3214
|
+'ObjectTypeInternalSlot[method]:exit'?: (
|
|
2823
3215
|
node: ObjectTypeInternalSlot_With_method,
|
|
2824
3216
|
) => void,
|
|
3217
|
+
+'ObjectTypeMappedTypeProperty:exit'?: (
|
|
3218
|
+
node: ObjectTypeMappedTypeProperty,
|
|
3219
|
+
) => void,
|
|
3220
|
+
+'ObjectTypeMappedTypeProperty[keyTparam]:exit'?: (
|
|
3221
|
+
node: ObjectTypeMappedTypeProperty_With_keyTparam,
|
|
3222
|
+
) => void,
|
|
3223
|
+
+'ObjectTypeMappedTypeProperty[propType]:exit'?: (
|
|
3224
|
+
node: ObjectTypeMappedTypeProperty_With_propType,
|
|
3225
|
+
) => void,
|
|
3226
|
+
+'ObjectTypeMappedTypeProperty[sourceType]:exit'?: (
|
|
3227
|
+
node: ObjectTypeMappedTypeProperty_With_sourceType,
|
|
3228
|
+
) => void,
|
|
3229
|
+
+'ObjectTypeMappedTypeProperty[variance]:exit'?: (
|
|
3230
|
+
node: ObjectTypeMappedTypeProperty_With_variance,
|
|
3231
|
+
) => void,
|
|
3232
|
+
+'ObjectTypeMappedTypeProperty[optional]:exit'?: (
|
|
3233
|
+
node: ObjectTypeMappedTypeProperty_With_optional,
|
|
3234
|
+
) => void,
|
|
2825
3235
|
+'ObjectTypeProperty:exit'?: (node: ObjectTypeProperty) => void,
|
|
2826
3236
|
+'ObjectTypeProperty[key]:exit'?: (node: ObjectTypeProperty_With_key) => void,
|
|
2827
3237
|
+'ObjectTypeProperty[value]:exit'?: (
|
|
@@ -2910,6 +3320,13 @@ export type ESQueryNodeSelectorsWithoutFallback = {
|
|
|
2910
3320
|
+'QualifiedTypeIdentifier[id]:exit'?: (
|
|
2911
3321
|
node: QualifiedTypeIdentifier_With_id,
|
|
2912
3322
|
) => void,
|
|
3323
|
+
+'QualifiedTypeofIdentifier:exit'?: (node: QualifiedTypeofIdentifier) => void,
|
|
3324
|
+
+'QualifiedTypeofIdentifier[qualification]:exit'?: (
|
|
3325
|
+
node: QualifiedTypeofIdentifier_With_qualification,
|
|
3326
|
+
) => void,
|
|
3327
|
+
+'QualifiedTypeofIdentifier[id]:exit'?: (
|
|
3328
|
+
node: QualifiedTypeofIdentifier_With_id,
|
|
3329
|
+
) => void,
|
|
2913
3330
|
+'RestElement:exit'?: (node: RestElement) => void,
|
|
2914
3331
|
+'RestElement[argument]:exit'?: (node: RestElement_With_argument) => void,
|
|
2915
3332
|
+'ReturnStatement:exit'?: (node: ReturnStatement) => void,
|
|
@@ -2972,6 +3389,26 @@ export type ESQueryNodeSelectorsWithoutFallback = {
|
|
|
2972
3389
|
+'TupleTypeAnnotation[types]:exit'?: (
|
|
2973
3390
|
node: TupleTypeAnnotation_With_types,
|
|
2974
3391
|
) => void,
|
|
3392
|
+
+'TupleTypeLabeledElement:exit'?: (node: TupleTypeLabeledElement) => void,
|
|
3393
|
+
+'TupleTypeLabeledElement[label]:exit'?: (
|
|
3394
|
+
node: TupleTypeLabeledElement_With_label,
|
|
3395
|
+
) => void,
|
|
3396
|
+
+'TupleTypeLabeledElement[elementType]:exit'?: (
|
|
3397
|
+
node: TupleTypeLabeledElement_With_elementType,
|
|
3398
|
+
) => void,
|
|
3399
|
+
+'TupleTypeLabeledElement[optional]:exit'?: (
|
|
3400
|
+
node: TupleTypeLabeledElement_With_optional,
|
|
3401
|
+
) => void,
|
|
3402
|
+
+'TupleTypeLabeledElement[variance]:exit'?: (
|
|
3403
|
+
node: TupleTypeLabeledElement_With_variance,
|
|
3404
|
+
) => void,
|
|
3405
|
+
+'TupleTypeSpreadElement:exit'?: (node: TupleTypeSpreadElement) => void,
|
|
3406
|
+
+'TupleTypeSpreadElement[label]:exit'?: (
|
|
3407
|
+
node: TupleTypeSpreadElement_With_label,
|
|
3408
|
+
) => void,
|
|
3409
|
+
+'TupleTypeSpreadElement[typeAnnotation]:exit'?: (
|
|
3410
|
+
node: TupleTypeSpreadElement_With_typeAnnotation,
|
|
3411
|
+
) => void,
|
|
2975
3412
|
+'TypeAlias:exit'?: (node: TypeAlias) => void,
|
|
2976
3413
|
+'TypeAlias[id]:exit'?: (node: TypeAlias_With_id) => void,
|
|
2977
3414
|
+'TypeAlias[typeParameters]:exit'?: (
|
|
@@ -3008,6 +3445,14 @@ export type ESQueryNodeSelectorsWithoutFallback = {
|
|
|
3008
3445
|
+'TypeParameterInstantiation[params]:exit'?: (
|
|
3009
3446
|
node: TypeParameterInstantiation_With_params,
|
|
3010
3447
|
) => void,
|
|
3448
|
+
+'TypePredicate:exit'?: (node: TypePredicate) => void,
|
|
3449
|
+
+'TypePredicate[parameterName]:exit'?: (
|
|
3450
|
+
node: TypePredicate_With_parameterName,
|
|
3451
|
+
) => void,
|
|
3452
|
+
+'TypePredicate[typeAnnotation]:exit'?: (
|
|
3453
|
+
node: TypePredicate_With_typeAnnotation,
|
|
3454
|
+
) => void,
|
|
3455
|
+
+'TypePredicate[asserts]:exit'?: (node: TypePredicate_With_asserts) => void,
|
|
3011
3456
|
+'UnaryExpression:exit'?: (node: UnaryExpression) => void,
|
|
3012
3457
|
+'UnaryExpression[operator]:exit'?: (
|
|
3013
3458
|
node: UnaryExpression_With_operator,
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
/* eslint no-undef: 'error', no-unused-vars: ['error', {vars: "local"}], no-redeclare: 'error' */
|
|
20
20
|
|
|
21
|
-
/* global $NonMaybeType,
|
|
21
|
+
/* global $NonMaybeType, Partial, $ReadOnly, $ReadOnlyArray */
|
|
22
22
|
'use strict';
|
|
23
23
|
|
|
24
24
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -72,13 +72,20 @@ exports.isClosingCurlyBracketToken = isClosingCurlyBracketToken;
|
|
|
72
72
|
exports.isClosingParenthesisToken = isClosingParenthesisToken;
|
|
73
73
|
exports.isColonToken = isColonToken;
|
|
74
74
|
exports.isCommaToken = isCommaToken;
|
|
75
|
+
exports.isComponentDeclaration = isComponentDeclaration;
|
|
76
|
+
exports.isComponentParameter = isComponentParameter;
|
|
77
|
+
exports.isComponentTypeAnnotation = isComponentTypeAnnotation;
|
|
78
|
+
exports.isComponentTypeParameter = isComponentTypeParameter;
|
|
75
79
|
exports.isConditionalExpression = isConditionalExpression;
|
|
80
|
+
exports.isConditionalTypeAnnotation = isConditionalTypeAnnotation;
|
|
76
81
|
exports.isConstToken = isConstToken;
|
|
77
82
|
exports.isContinueStatement = isContinueStatement;
|
|
78
83
|
exports.isContinueToken = isContinueToken;
|
|
79
84
|
exports.isDebuggerStatement = isDebuggerStatement;
|
|
80
85
|
exports.isDebuggerToken = isDebuggerToken;
|
|
81
86
|
exports.isDeclareClass = isDeclareClass;
|
|
87
|
+
exports.isDeclareComponent = isDeclareComponent;
|
|
88
|
+
exports.isDeclareEnum = isDeclareEnum;
|
|
82
89
|
exports.isDeclareExportAllDeclaration = isDeclareExportAllDeclaration;
|
|
83
90
|
exports.isDeclareExportDeclaration = isDeclareExportDeclaration;
|
|
84
91
|
exports.isDeclareFunction = isDeclareFunction;
|
|
@@ -152,6 +159,7 @@ exports.isImportToken = isImportToken;
|
|
|
152
159
|
exports.isInToken = isInToken;
|
|
153
160
|
exports.isIncrementToken = isIncrementToken;
|
|
154
161
|
exports.isIndexedAccessType = isIndexedAccessType;
|
|
162
|
+
exports.isInferTypeAnnotation = isInferTypeAnnotation;
|
|
155
163
|
exports.isInferredPredicate = isInferredPredicate;
|
|
156
164
|
exports.isInstanceOfToken = isInstanceOfToken;
|
|
157
165
|
exports.isInterfaceDeclaration = isInterfaceDeclaration;
|
|
@@ -175,6 +183,7 @@ exports.isJSXOpeningFragment = isJSXOpeningFragment;
|
|
|
175
183
|
exports.isJSXSpreadAttribute = isJSXSpreadAttribute;
|
|
176
184
|
exports.isJSXSpreadChild = isJSXSpreadChild;
|
|
177
185
|
exports.isJSXText = isJSXText;
|
|
186
|
+
exports.isKeyofTypeAnnotation = isKeyofTypeAnnotation;
|
|
178
187
|
exports.isLabeledStatement = isLabeledStatement;
|
|
179
188
|
exports.isLessThanOrEqualToToken = isLessThanOrEqualToToken;
|
|
180
189
|
exports.isLessThanToken = isLessThanToken;
|
|
@@ -211,6 +220,7 @@ exports.isObjectTypeAnnotation = isObjectTypeAnnotation;
|
|
|
211
220
|
exports.isObjectTypeCallProperty = isObjectTypeCallProperty;
|
|
212
221
|
exports.isObjectTypeIndexer = isObjectTypeIndexer;
|
|
213
222
|
exports.isObjectTypeInternalSlot = isObjectTypeInternalSlot;
|
|
223
|
+
exports.isObjectTypeMappedTypeProperty = isObjectTypeMappedTypeProperty;
|
|
214
224
|
exports.isObjectTypeProperty = isObjectTypeProperty;
|
|
215
225
|
exports.isObjectTypeSpreadProperty = isObjectTypeSpreadProperty;
|
|
216
226
|
exports.isOfKeyword = isOfKeyword;
|
|
@@ -227,6 +237,7 @@ exports.isPrivateIdentifier = isPrivateIdentifier;
|
|
|
227
237
|
exports.isProperty = isProperty;
|
|
228
238
|
exports.isPropertyDefinition = isPropertyDefinition;
|
|
229
239
|
exports.isQualifiedTypeIdentifier = isQualifiedTypeIdentifier;
|
|
240
|
+
exports.isQualifiedTypeofIdentifier = isQualifiedTypeofIdentifier;
|
|
230
241
|
exports.isQuestionMarkToken = isQuestionMarkToken;
|
|
231
242
|
exports.isRemainderEqualToken = isRemainderEqualToken;
|
|
232
243
|
exports.isRestElement = isRestElement;
|
|
@@ -258,6 +269,8 @@ exports.isThrowToken = isThrowToken;
|
|
|
258
269
|
exports.isTryStatement = isTryStatement;
|
|
259
270
|
exports.isTryToken = isTryToken;
|
|
260
271
|
exports.isTupleTypeAnnotation = isTupleTypeAnnotation;
|
|
272
|
+
exports.isTupleTypeLabeledElement = isTupleTypeLabeledElement;
|
|
273
|
+
exports.isTupleTypeSpreadElement = isTupleTypeSpreadElement;
|
|
261
274
|
exports.isTypeAlias = isTypeAlias;
|
|
262
275
|
exports.isTypeAnnotation = isTypeAnnotation;
|
|
263
276
|
exports.isTypeCastExpression = isTypeCastExpression;
|
|
@@ -266,6 +279,7 @@ exports.isTypeOfToken = isTypeOfToken;
|
|
|
266
279
|
exports.isTypeParameter = isTypeParameter;
|
|
267
280
|
exports.isTypeParameterDeclaration = isTypeParameterDeclaration;
|
|
268
281
|
exports.isTypeParameterInstantiation = isTypeParameterInstantiation;
|
|
282
|
+
exports.isTypePredicate = isTypePredicate;
|
|
269
283
|
exports.isTypeofTypeAnnotation = isTypeofTypeAnnotation;
|
|
270
284
|
exports.isUnaryExpression = isUnaryExpression;
|
|
271
285
|
exports.isUnaryNegationToken = isUnaryNegationToken;
|
|
@@ -373,10 +387,30 @@ function isClassImplements(node) {
|
|
|
373
387
|
return node.type === 'ClassImplements';
|
|
374
388
|
}
|
|
375
389
|
|
|
390
|
+
function isComponentDeclaration(node) {
|
|
391
|
+
return node.type === 'ComponentDeclaration';
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
function isComponentParameter(node) {
|
|
395
|
+
return node.type === 'ComponentParameter';
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
function isComponentTypeAnnotation(node) {
|
|
399
|
+
return node.type === 'ComponentTypeAnnotation';
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
function isComponentTypeParameter(node) {
|
|
403
|
+
return node.type === 'ComponentTypeParameter';
|
|
404
|
+
}
|
|
405
|
+
|
|
376
406
|
function isConditionalExpression(node) {
|
|
377
407
|
return node.type === 'ConditionalExpression';
|
|
378
408
|
}
|
|
379
409
|
|
|
410
|
+
function isConditionalTypeAnnotation(node) {
|
|
411
|
+
return node.type === 'ConditionalTypeAnnotation';
|
|
412
|
+
}
|
|
413
|
+
|
|
380
414
|
function isContinueStatement(node) {
|
|
381
415
|
return node.type === 'ContinueStatement';
|
|
382
416
|
}
|
|
@@ -389,10 +423,18 @@ function isDeclareClass(node) {
|
|
|
389
423
|
return node.type === 'DeclareClass';
|
|
390
424
|
}
|
|
391
425
|
|
|
426
|
+
function isDeclareComponent(node) {
|
|
427
|
+
return node.type === 'DeclareComponent';
|
|
428
|
+
}
|
|
429
|
+
|
|
392
430
|
function isDeclaredPredicate(node) {
|
|
393
431
|
return node.type === 'DeclaredPredicate';
|
|
394
432
|
}
|
|
395
433
|
|
|
434
|
+
function isDeclareEnum(node) {
|
|
435
|
+
return node.type === 'DeclareEnum';
|
|
436
|
+
}
|
|
437
|
+
|
|
396
438
|
function isDeclareExportAllDeclaration(node) {
|
|
397
439
|
return node.type === 'DeclareExportAllDeclaration';
|
|
398
440
|
}
|
|
@@ -573,6 +615,10 @@ function isInferredPredicate(node) {
|
|
|
573
615
|
return node.type === 'InferredPredicate';
|
|
574
616
|
}
|
|
575
617
|
|
|
618
|
+
function isInferTypeAnnotation(node) {
|
|
619
|
+
return node.type === 'InferTypeAnnotation';
|
|
620
|
+
}
|
|
621
|
+
|
|
576
622
|
function isInterfaceDeclaration(node) {
|
|
577
623
|
return node.type === 'InterfaceDeclaration';
|
|
578
624
|
}
|
|
@@ -649,6 +695,10 @@ function isJSXText(node) {
|
|
|
649
695
|
return node.type === 'JSXText';
|
|
650
696
|
}
|
|
651
697
|
|
|
698
|
+
function isKeyofTypeAnnotation(node) {
|
|
699
|
+
return node.type === 'KeyofTypeAnnotation';
|
|
700
|
+
}
|
|
701
|
+
|
|
652
702
|
function isLabeledStatement(node) {
|
|
653
703
|
return node.type === 'LabeledStatement';
|
|
654
704
|
}
|
|
@@ -717,6 +767,10 @@ function isObjectTypeInternalSlot(node) {
|
|
|
717
767
|
return node.type === 'ObjectTypeInternalSlot';
|
|
718
768
|
}
|
|
719
769
|
|
|
770
|
+
function isObjectTypeMappedTypeProperty(node) {
|
|
771
|
+
return node.type === 'ObjectTypeMappedTypeProperty';
|
|
772
|
+
}
|
|
773
|
+
|
|
720
774
|
function isObjectTypeProperty(node) {
|
|
721
775
|
return node.type === 'ObjectTypeProperty';
|
|
722
776
|
}
|
|
@@ -749,6 +803,10 @@ function isQualifiedTypeIdentifier(node) {
|
|
|
749
803
|
return node.type === 'QualifiedTypeIdentifier';
|
|
750
804
|
}
|
|
751
805
|
|
|
806
|
+
function isQualifiedTypeofIdentifier(node) {
|
|
807
|
+
return node.type === 'QualifiedTypeofIdentifier';
|
|
808
|
+
}
|
|
809
|
+
|
|
752
810
|
function isRestElement(node) {
|
|
753
811
|
return node.type === 'RestElement';
|
|
754
812
|
}
|
|
@@ -821,6 +879,14 @@ function isTupleTypeAnnotation(node) {
|
|
|
821
879
|
return node.type === 'TupleTypeAnnotation';
|
|
822
880
|
}
|
|
823
881
|
|
|
882
|
+
function isTupleTypeLabeledElement(node) {
|
|
883
|
+
return node.type === 'TupleTypeLabeledElement';
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
function isTupleTypeSpreadElement(node) {
|
|
887
|
+
return node.type === 'TupleTypeSpreadElement';
|
|
888
|
+
}
|
|
889
|
+
|
|
824
890
|
function isTypeAlias(node) {
|
|
825
891
|
return node.type === 'TypeAlias';
|
|
826
892
|
}
|
|
@@ -849,6 +915,10 @@ function isTypeParameterInstantiation(node) {
|
|
|
849
915
|
return node.type === 'TypeParameterInstantiation';
|
|
850
916
|
}
|
|
851
917
|
|
|
918
|
+
function isTypePredicate(node) {
|
|
919
|
+
return node.type === 'TypePredicate';
|
|
920
|
+
}
|
|
921
|
+
|
|
852
922
|
function isUnaryExpression(node) {
|
|
853
923
|
return node.type === 'UnaryExpression';
|
|
854
924
|
}
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
// lint directives to let us do some basic validation of generated files
|
|
19
19
|
/* eslint no-undef: 'error', no-unused-vars: ['error', {vars: "local"}], no-redeclare: 'error' */
|
|
20
|
-
/* global $NonMaybeType,
|
|
20
|
+
/* global $NonMaybeType, Partial, $ReadOnly, $ReadOnlyArray */
|
|
21
21
|
|
|
22
22
|
'use strict';
|
|
23
23
|
|
|
@@ -117,10 +117,36 @@ export function isClassImplements(node: ESNode | Token): boolean %checks {
|
|
|
117
117
|
return node.type === 'ClassImplements';
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
+
export function isComponentDeclaration(node: ESNode | Token): boolean %checks {
|
|
121
|
+
return node.type === 'ComponentDeclaration';
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export function isComponentParameter(node: ESNode | Token): boolean %checks {
|
|
125
|
+
return node.type === 'ComponentParameter';
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export function isComponentTypeAnnotation(
|
|
129
|
+
node: ESNode | Token,
|
|
130
|
+
): boolean %checks {
|
|
131
|
+
return node.type === 'ComponentTypeAnnotation';
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export function isComponentTypeParameter(
|
|
135
|
+
node: ESNode | Token,
|
|
136
|
+
): boolean %checks {
|
|
137
|
+
return node.type === 'ComponentTypeParameter';
|
|
138
|
+
}
|
|
139
|
+
|
|
120
140
|
export function isConditionalExpression(node: ESNode | Token): boolean %checks {
|
|
121
141
|
return node.type === 'ConditionalExpression';
|
|
122
142
|
}
|
|
123
143
|
|
|
144
|
+
export function isConditionalTypeAnnotation(
|
|
145
|
+
node: ESNode | Token,
|
|
146
|
+
): boolean %checks {
|
|
147
|
+
return node.type === 'ConditionalTypeAnnotation';
|
|
148
|
+
}
|
|
149
|
+
|
|
124
150
|
export function isContinueStatement(node: ESNode | Token): boolean %checks {
|
|
125
151
|
return node.type === 'ContinueStatement';
|
|
126
152
|
}
|
|
@@ -133,10 +159,18 @@ export function isDeclareClass(node: ESNode | Token): boolean %checks {
|
|
|
133
159
|
return node.type === 'DeclareClass';
|
|
134
160
|
}
|
|
135
161
|
|
|
162
|
+
export function isDeclareComponent(node: ESNode | Token): boolean %checks {
|
|
163
|
+
return node.type === 'DeclareComponent';
|
|
164
|
+
}
|
|
165
|
+
|
|
136
166
|
export function isDeclaredPredicate(node: ESNode | Token): boolean %checks {
|
|
137
167
|
return node.type === 'DeclaredPredicate';
|
|
138
168
|
}
|
|
139
169
|
|
|
170
|
+
export function isDeclareEnum(node: ESNode | Token): boolean %checks {
|
|
171
|
+
return node.type === 'DeclareEnum';
|
|
172
|
+
}
|
|
173
|
+
|
|
140
174
|
export function isDeclareExportAllDeclaration(
|
|
141
175
|
node: ESNode | Token,
|
|
142
176
|
): boolean %checks {
|
|
@@ -331,6 +365,10 @@ export function isInferredPredicate(node: ESNode | Token): boolean %checks {
|
|
|
331
365
|
return node.type === 'InferredPredicate';
|
|
332
366
|
}
|
|
333
367
|
|
|
368
|
+
export function isInferTypeAnnotation(node: ESNode | Token): boolean %checks {
|
|
369
|
+
return node.type === 'InferTypeAnnotation';
|
|
370
|
+
}
|
|
371
|
+
|
|
334
372
|
export function isInterfaceDeclaration(node: ESNode | Token): boolean %checks {
|
|
335
373
|
return node.type === 'InterfaceDeclaration';
|
|
336
374
|
}
|
|
@@ -413,6 +451,10 @@ export function isJSXText(node: ESNode | Token): boolean %checks {
|
|
|
413
451
|
return node.type === 'JSXText';
|
|
414
452
|
}
|
|
415
453
|
|
|
454
|
+
export function isKeyofTypeAnnotation(node: ESNode | Token): boolean %checks {
|
|
455
|
+
return node.type === 'KeyofTypeAnnotation';
|
|
456
|
+
}
|
|
457
|
+
|
|
416
458
|
export function isLabeledStatement(node: ESNode | Token): boolean %checks {
|
|
417
459
|
return node.type === 'LabeledStatement';
|
|
418
460
|
}
|
|
@@ -491,6 +533,12 @@ export function isObjectTypeInternalSlot(
|
|
|
491
533
|
return node.type === 'ObjectTypeInternalSlot';
|
|
492
534
|
}
|
|
493
535
|
|
|
536
|
+
export function isObjectTypeMappedTypeProperty(
|
|
537
|
+
node: ESNode | Token,
|
|
538
|
+
): boolean %checks {
|
|
539
|
+
return node.type === 'ObjectTypeMappedTypeProperty';
|
|
540
|
+
}
|
|
541
|
+
|
|
494
542
|
export function isObjectTypeProperty(node: ESNode | Token): boolean %checks {
|
|
495
543
|
return node.type === 'ObjectTypeProperty';
|
|
496
544
|
}
|
|
@@ -529,6 +577,12 @@ export function isQualifiedTypeIdentifier(
|
|
|
529
577
|
return node.type === 'QualifiedTypeIdentifier';
|
|
530
578
|
}
|
|
531
579
|
|
|
580
|
+
export function isQualifiedTypeofIdentifier(
|
|
581
|
+
node: ESNode | Token,
|
|
582
|
+
): boolean %checks {
|
|
583
|
+
return node.type === 'QualifiedTypeofIdentifier';
|
|
584
|
+
}
|
|
585
|
+
|
|
532
586
|
export function isRestElement(node: ESNode | Token): boolean %checks {
|
|
533
587
|
return node.type === 'RestElement';
|
|
534
588
|
}
|
|
@@ -605,6 +659,18 @@ export function isTupleTypeAnnotation(node: ESNode | Token): boolean %checks {
|
|
|
605
659
|
return node.type === 'TupleTypeAnnotation';
|
|
606
660
|
}
|
|
607
661
|
|
|
662
|
+
export function isTupleTypeLabeledElement(
|
|
663
|
+
node: ESNode | Token,
|
|
664
|
+
): boolean %checks {
|
|
665
|
+
return node.type === 'TupleTypeLabeledElement';
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
export function isTupleTypeSpreadElement(
|
|
669
|
+
node: ESNode | Token,
|
|
670
|
+
): boolean %checks {
|
|
671
|
+
return node.type === 'TupleTypeSpreadElement';
|
|
672
|
+
}
|
|
673
|
+
|
|
608
674
|
export function isTypeAlias(node: ESNode | Token): boolean %checks {
|
|
609
675
|
return node.type === 'TypeAlias';
|
|
610
676
|
}
|
|
@@ -637,6 +703,10 @@ export function isTypeParameterInstantiation(
|
|
|
637
703
|
return node.type === 'TypeParameterInstantiation';
|
|
638
704
|
}
|
|
639
705
|
|
|
706
|
+
export function isTypePredicate(node: ESNode | Token): boolean %checks {
|
|
707
|
+
return node.type === 'TypePredicate';
|
|
708
|
+
}
|
|
709
|
+
|
|
640
710
|
export function isUnaryExpression(node: ESNode | Token): boolean %checks {
|
|
641
711
|
return node.type === 'UnaryExpression';
|
|
642
712
|
}
|
package/dist/types.js.flow
CHANGED
|
@@ -174,17 +174,21 @@ export type ESNode =
|
|
|
174
174
|
| TypeAnnotationType
|
|
175
175
|
| Variance
|
|
176
176
|
| FunctionTypeParam
|
|
177
|
+
| ComponentTypeParameter
|
|
177
178
|
| InferredPredicate
|
|
178
179
|
| ObjectTypeProperty
|
|
179
180
|
| ObjectTypeCallProperty
|
|
180
181
|
| ObjectTypeIndexer
|
|
181
182
|
| ObjectTypeSpreadProperty
|
|
183
|
+
| ObjectTypeMappedTypeProperty
|
|
182
184
|
| InterfaceExtends
|
|
183
185
|
| ClassImplements
|
|
184
186
|
| Decorator
|
|
185
187
|
| TypeParameterDeclaration
|
|
186
188
|
| TypeParameter
|
|
187
189
|
| TypeParameterInstantiation
|
|
190
|
+
| ComponentDeclaration
|
|
191
|
+
| ComponentParameter
|
|
188
192
|
| EnumDeclaration
|
|
189
193
|
| EnumNumberBody
|
|
190
194
|
| EnumStringBody
|
|
@@ -227,10 +231,13 @@ export type Statement =
|
|
|
227
231
|
| BlockStatement
|
|
228
232
|
| BreakStatement
|
|
229
233
|
| ClassDeclaration
|
|
234
|
+
| ComponentDeclaration
|
|
230
235
|
| ContinueStatement
|
|
231
236
|
| DebuggerStatement
|
|
232
237
|
| DeclareClass
|
|
238
|
+
| DeclareComponent
|
|
233
239
|
| DeclareVariable
|
|
240
|
+
| DeclareEnum
|
|
234
241
|
| DeclareFunction
|
|
235
242
|
| DeclareInterface
|
|
236
243
|
| DeclareModule
|
|
@@ -377,6 +384,24 @@ export interface DebuggerStatement extends BaseNode {
|
|
|
377
384
|
+type: 'DebuggerStatement';
|
|
378
385
|
}
|
|
379
386
|
|
|
387
|
+
type ComponentParameterAndRestElement = ComponentParameter | RestElement;
|
|
388
|
+
|
|
389
|
+
export interface ComponentParameter extends BaseNode {
|
|
390
|
+
+type: 'ComponentParameter';
|
|
391
|
+
+name: Identifier | StringLiteral;
|
|
392
|
+
+local: BindingName | AssignmentPattern;
|
|
393
|
+
+shorthand: boolean;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
export interface ComponentDeclaration extends BaseNode {
|
|
397
|
+
+type: 'ComponentDeclaration';
|
|
398
|
+
+body: BlockStatement;
|
|
399
|
+
+id: Identifier;
|
|
400
|
+
+params: $ReadOnlyArray<ComponentParameterAndRestElement>;
|
|
401
|
+
+returnType: null | TypeAnnotation;
|
|
402
|
+
+typeParameters: null | TypeParameterDeclaration;
|
|
403
|
+
}
|
|
404
|
+
|
|
380
405
|
export interface FunctionDeclaration extends BaseFunction {
|
|
381
406
|
+type: 'FunctionDeclaration';
|
|
382
407
|
/** It is null when a function declaration is a part of the `export default function` statement */
|
|
@@ -619,7 +644,6 @@ export type MemberExpression =
|
|
|
619
644
|
| MemberExpressionWithNonComputedName;
|
|
620
645
|
export interface MemberExpressionWithComputedName extends BaseNode {
|
|
621
646
|
+type: 'MemberExpression';
|
|
622
|
-
+computed: true;
|
|
623
647
|
+object: Expression | Super;
|
|
624
648
|
+property: Expression;
|
|
625
649
|
+computed: true;
|
|
@@ -627,7 +651,6 @@ export interface MemberExpressionWithComputedName extends BaseNode {
|
|
|
627
651
|
}
|
|
628
652
|
export interface MemberExpressionWithNonComputedName extends BaseNode {
|
|
629
653
|
+type: 'MemberExpression';
|
|
630
|
-
+computed: false;
|
|
631
654
|
+object: Expression | Super;
|
|
632
655
|
+property: Identifier | PrivateIdentifier;
|
|
633
656
|
+computed: false;
|
|
@@ -1021,7 +1044,10 @@ export interface ImportNamespaceSpecifier extends BaseNode {
|
|
|
1021
1044
|
+parent: ImportDeclaration;
|
|
1022
1045
|
}
|
|
1023
1046
|
|
|
1024
|
-
export type DefaultDeclaration =
|
|
1047
|
+
export type DefaultDeclaration =
|
|
1048
|
+
| FunctionDeclaration
|
|
1049
|
+
| ClassDeclaration
|
|
1050
|
+
| ComponentDeclaration;
|
|
1025
1051
|
export type NamedDeclaration =
|
|
1026
1052
|
| DefaultDeclaration
|
|
1027
1053
|
| VariableDeclaration
|
|
@@ -1103,12 +1129,20 @@ export type TypeAnnotationType =
|
|
|
1103
1129
|
| ExistsTypeAnnotation
|
|
1104
1130
|
| GenericTypeAnnotation
|
|
1105
1131
|
| QualifiedTypeIdentifier
|
|
1132
|
+
| QualifiedTypeofIdentifier
|
|
1106
1133
|
| TypeofTypeAnnotation
|
|
1134
|
+
| KeyofTypeAnnotation
|
|
1107
1135
|
| TupleTypeAnnotation
|
|
1136
|
+
| TupleTypeSpreadElement
|
|
1137
|
+
| TupleTypeLabeledElement
|
|
1138
|
+
| InferTypeAnnotation
|
|
1108
1139
|
| InterfaceTypeAnnotation
|
|
1109
1140
|
| UnionTypeAnnotation
|
|
1110
1141
|
| IntersectionTypeAnnotation
|
|
1142
|
+
| ConditionalTypeAnnotation
|
|
1143
|
+
| TypePredicate
|
|
1111
1144
|
| FunctionTypeAnnotation
|
|
1145
|
+
| ComponentTypeAnnotation
|
|
1112
1146
|
| ObjectTypeAnnotation
|
|
1113
1147
|
| IndexedAccessType
|
|
1114
1148
|
| OptionalIndexedAccessType;
|
|
@@ -1218,14 +1252,40 @@ export interface QualifiedTypeIdentifier extends BaseNode {
|
|
|
1218
1252
|
+id: Identifier;
|
|
1219
1253
|
+qualification: QualifiedTypeIdentifier | Identifier;
|
|
1220
1254
|
}
|
|
1255
|
+
export interface QualifiedTypeofIdentifier extends BaseNode {
|
|
1256
|
+
+type: 'QualifiedTypeofIdentifier';
|
|
1257
|
+
+id: Identifier;
|
|
1258
|
+
+qualification: QualifiedTypeofIdentifier | Identifier;
|
|
1259
|
+
}
|
|
1221
1260
|
export interface TypeofTypeAnnotation extends BaseNode {
|
|
1222
1261
|
+type: 'TypeofTypeAnnotation';
|
|
1262
|
+
+argument: QualifiedTypeofIdentifier | Identifier;
|
|
1263
|
+
}
|
|
1264
|
+
export interface KeyofTypeAnnotation extends BaseNode {
|
|
1265
|
+
+type: 'KeyofTypeAnnotation';
|
|
1223
1266
|
+argument: TypeAnnotationType;
|
|
1224
1267
|
}
|
|
1225
1268
|
export interface TupleTypeAnnotation extends BaseNode {
|
|
1226
1269
|
+type: 'TupleTypeAnnotation';
|
|
1227
1270
|
+types: $ReadOnlyArray<TypeAnnotationType>;
|
|
1228
1271
|
}
|
|
1272
|
+
export interface TupleTypeSpreadElement extends BaseNode {
|
|
1273
|
+
+type: 'TupleTypeSpreadElement';
|
|
1274
|
+
+label?: Identifier | null;
|
|
1275
|
+
+typeAnnotation: TypeAnnotationType;
|
|
1276
|
+
}
|
|
1277
|
+
export interface TupleTypeLabeledElement extends BaseNode {
|
|
1278
|
+
+type: 'TupleTypeLabeledElement';
|
|
1279
|
+
+label: Identifier;
|
|
1280
|
+
+elementType: TypeAnnotationType;
|
|
1281
|
+
+optional: boolean;
|
|
1282
|
+
+variance: Variance | null;
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1285
|
+
export interface InferTypeAnnotation extends BaseNode {
|
|
1286
|
+
+type: 'InferTypeAnnotation';
|
|
1287
|
+
+typeParameter: TypeParameter;
|
|
1288
|
+
}
|
|
1229
1289
|
|
|
1230
1290
|
// type T = { [[foo]]: number };
|
|
1231
1291
|
export interface ObjectTypeInternalSlot extends BaseNode {
|
|
@@ -1252,6 +1312,21 @@ export interface IntersectionTypeAnnotation extends BaseNode {
|
|
|
1252
1312
|
+types: $ReadOnlyArray<TypeAnnotationType>;
|
|
1253
1313
|
}
|
|
1254
1314
|
|
|
1315
|
+
export interface ConditionalTypeAnnotation extends BaseNode {
|
|
1316
|
+
+type: 'ConditionalTypeAnnotation';
|
|
1317
|
+
+checkType: TypeAnnotationType;
|
|
1318
|
+
+extendsType: TypeAnnotationType;
|
|
1319
|
+
+trueType: TypeAnnotationType;
|
|
1320
|
+
+falseType: TypeAnnotationType;
|
|
1321
|
+
}
|
|
1322
|
+
|
|
1323
|
+
export interface TypePredicate extends BaseNode {
|
|
1324
|
+
+type: 'TypePredicate';
|
|
1325
|
+
+parameterName: Identifier;
|
|
1326
|
+
+typeAnnotation: TypeAnnotationType | null;
|
|
1327
|
+
+asserts: boolean;
|
|
1328
|
+
}
|
|
1329
|
+
|
|
1255
1330
|
export interface FunctionTypeAnnotation extends BaseNode {
|
|
1256
1331
|
+type: 'FunctionTypeAnnotation';
|
|
1257
1332
|
+params: $ReadOnlyArray<FunctionTypeParam>;
|
|
@@ -1268,6 +1343,23 @@ export interface FunctionTypeParam extends BaseNode {
|
|
|
1268
1343
|
|
|
1269
1344
|
+parent: FunctionTypeAnnotation;
|
|
1270
1345
|
}
|
|
1346
|
+
|
|
1347
|
+
export interface ComponentTypeAnnotation extends BaseNode {
|
|
1348
|
+
+type: 'ComponentTypeAnnotation';
|
|
1349
|
+
+params: $ReadOnlyArray<ComponentTypeParameter>;
|
|
1350
|
+
+rest: null | ComponentTypeParameter;
|
|
1351
|
+
+typeParameters: null | TypeParameterDeclaration;
|
|
1352
|
+
+returnType: null | TypeAnnotationType;
|
|
1353
|
+
}
|
|
1354
|
+
export interface ComponentTypeParameter extends BaseNode {
|
|
1355
|
+
+type: 'ComponentTypeParameter';
|
|
1356
|
+
+name: Identifier | StringLiteral | null;
|
|
1357
|
+
+typeAnnotation: TypeAnnotationType | null;
|
|
1358
|
+
+optional: boolean;
|
|
1359
|
+
|
|
1360
|
+
+parent: ComponentTypeAnnotation | DeclareComponent;
|
|
1361
|
+
}
|
|
1362
|
+
|
|
1271
1363
|
export interface InferredPredicate extends BaseNode {
|
|
1272
1364
|
+type: 'InferredPredicate';
|
|
1273
1365
|
|
|
@@ -1278,7 +1370,11 @@ export interface ObjectTypeAnnotation extends BaseNode {
|
|
|
1278
1370
|
+type: 'ObjectTypeAnnotation';
|
|
1279
1371
|
+inexact: false;
|
|
1280
1372
|
+exact: boolean;
|
|
1281
|
-
+properties: $ReadOnlyArray<
|
|
1373
|
+
+properties: $ReadOnlyArray<
|
|
1374
|
+
| ObjectTypeProperty
|
|
1375
|
+
| ObjectTypeSpreadProperty
|
|
1376
|
+
| ObjectTypeMappedTypeProperty,
|
|
1377
|
+
>;
|
|
1282
1378
|
+indexers: $ReadOnlyArray<ObjectTypeIndexer>;
|
|
1283
1379
|
+callProperties: $ReadOnlyArray<ObjectTypeCallProperty>;
|
|
1284
1380
|
+internalSlots: $ReadOnlyArray<ObjectTypeInternalSlot>;
|
|
@@ -1348,6 +1444,17 @@ export interface ObjectTypeIndexer extends BaseNode {
|
|
|
1348
1444
|
|
|
1349
1445
|
+parent: ObjectTypeAnnotation;
|
|
1350
1446
|
}
|
|
1447
|
+
export interface ObjectTypeMappedTypeProperty extends BaseNode {
|
|
1448
|
+
+type: 'ObjectTypeMappedTypeProperty';
|
|
1449
|
+
+keyTparam: TypeParameter;
|
|
1450
|
+
+propType: TypeAnnotationType;
|
|
1451
|
+
+sourceType: TypeAnnotationType;
|
|
1452
|
+
+variance: null | Variance;
|
|
1453
|
+
+optional: null | 'PlusOptional' | 'MinusOptional' | 'Optional';
|
|
1454
|
+
|
|
1455
|
+
+parent: ObjectTypeAnnotation;
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1351
1458
|
export interface ObjectTypeSpreadProperty extends BaseNode {
|
|
1352
1459
|
+type: 'ObjectTypeSpreadProperty';
|
|
1353
1460
|
+argument: TypeAnnotationType;
|
|
@@ -1511,7 +1618,9 @@ export interface EnumDefaultedMember extends BaseNode {
|
|
|
1511
1618
|
|
|
1512
1619
|
export type DeclaredNode =
|
|
1513
1620
|
| DeclareClass
|
|
1621
|
+
| DeclareComponent
|
|
1514
1622
|
| DeclareVariable
|
|
1623
|
+
| DeclareEnum
|
|
1515
1624
|
| DeclareFunction
|
|
1516
1625
|
| DeclareModule
|
|
1517
1626
|
| DeclareInterface
|
|
@@ -1532,9 +1641,25 @@ export interface DeclareClass extends BaseNode {
|
|
|
1532
1641
|
+mixins: $ReadOnlyArray<InterfaceExtends>;
|
|
1533
1642
|
}
|
|
1534
1643
|
|
|
1644
|
+
export interface DeclareComponent extends BaseNode {
|
|
1645
|
+
+type: 'DeclareComponent';
|
|
1646
|
+
+id: Identifier;
|
|
1647
|
+
+params: Array<ComponentTypeParameter>;
|
|
1648
|
+
+rest: null | ComponentTypeParameter;
|
|
1649
|
+
+typeParameters: null | TypeParameterDeclaration;
|
|
1650
|
+
+returnType: null | TypeAnnotation;
|
|
1651
|
+
}
|
|
1652
|
+
|
|
1535
1653
|
export interface DeclareVariable extends BaseNode {
|
|
1536
1654
|
+type: 'DeclareVariable';
|
|
1537
1655
|
+id: Identifier;
|
|
1656
|
+
+kind: 'var' | 'let' | 'const';
|
|
1657
|
+
}
|
|
1658
|
+
|
|
1659
|
+
export interface DeclareEnum extends BaseNode {
|
|
1660
|
+
+type: 'DeclareEnum';
|
|
1661
|
+
+id: Identifier;
|
|
1662
|
+
+body: EnumNumberBody | EnumStringBody | EnumBooleanBody | EnumSymbolBody;
|
|
1538
1663
|
}
|
|
1539
1664
|
|
|
1540
1665
|
export interface DeclareFunction extends BaseNode {
|
|
@@ -1597,7 +1722,8 @@ export interface DeclareExportDeclarationNamedWithDeclaration
|
|
|
1597
1722
|
| DeclareFunction
|
|
1598
1723
|
| DeclareInterface
|
|
1599
1724
|
| DeclareOpaqueType
|
|
1600
|
-
| DeclareVariable
|
|
1725
|
+
| DeclareVariable
|
|
1726
|
+
| DeclareEnum;
|
|
1601
1727
|
+default: false;
|
|
1602
1728
|
+source: null;
|
|
1603
1729
|
// default cannot have specifiers and a declaration
|
|
@@ -1726,6 +1852,7 @@ export interface JSXOpeningElement extends BaseNode {
|
|
|
1726
1852
|
+selfClosing: boolean;
|
|
1727
1853
|
+name: JSXTagNameExpression;
|
|
1728
1854
|
+attributes: $ReadOnlyArray<JSXAttribute | JSXSpreadAttribute>;
|
|
1855
|
+
+typeArguments?: TypeParameterInstantiation | null;
|
|
1729
1856
|
|
|
1730
1857
|
+parent: JSXElement;
|
|
1731
1858
|
}
|