hermes-estree 0.32.1 → 0.33.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/HermesESTreeSelectorTypes.js.flow +262 -27
- package/dist/generated/predicates.js +120 -0
- package/dist/generated/predicates.js.flow +72 -0
- package/dist/predicates.js +2 -4
- package/dist/predicates.js.flow +5 -4
- package/dist/src/generated/predicates.js +120 -0
- package/dist/src/predicates.js +2 -4
- package/dist/types.js.flow +103 -11
- package/package.json +1 -1
- package/dist/HermesAST.js.flow +0 -57
- package/dist/HermesASTAdapter.js +0 -192
- package/dist/HermesASTAdapter.js.flow +0 -189
- package/dist/HermesParser.js +0 -108
- package/dist/HermesParser.js.flow +0 -161
- package/dist/HermesParserDecodeUTF8String.js +0 -68
- package/dist/HermesParserDecodeUTF8String.js.flow +0 -65
- package/dist/HermesParserDeserializer.js +0 -242
- package/dist/HermesParserDeserializer.js.flow +0 -260
- package/dist/HermesParserNodeDeserializers.js +0 -2477
- package/dist/HermesParserNodeDeserializers.js.flow +0 -16
- package/dist/HermesParserWASM.js +0 -6
- package/dist/HermesParserWASM.js.flow +0 -87
- package/dist/HermesToESTreeAdapter.js +0 -439
- package/dist/HermesToESTreeAdapter.js.flow +0 -421
- package/dist/ParserOptions.js +0 -18
- package/dist/ParserOptions.js.flow +0 -41
- package/dist/babel/TransformESTreeToBabel.js +0 -1123
- package/dist/babel/TransformESTreeToBabel.js.flow +0 -1277
- package/dist/estree/StripFlowTypes.js +0 -175
- package/dist/estree/StripFlowTypes.js.flow +0 -158
- package/dist/estree/StripFlowTypesForBabel.js +0 -215
- package/dist/estree/StripFlowTypesForBabel.js.flow +0 -216
- package/dist/estree/TransformComponentSyntax.js +0 -788
- package/dist/estree/TransformComponentSyntax.js.flow +0 -864
- package/dist/estree/TransformEnumSyntax.js +0 -106
- package/dist/estree/TransformEnumSyntax.js.flow +0 -125
- package/dist/estree/TransformMatchSyntax.js +0 -1006
- package/dist/estree/TransformMatchSyntax.js.flow +0 -912
- package/dist/generated/ESTreeVisitorKeys.js +0 -220
- package/dist/generated/ESTreeVisitorKeys.js.flow +0 -15
- package/dist/generated/ParserVisitorKeys.js +0 -794
- package/dist/generated/ParserVisitorKeys.js.flow +0 -17
- package/dist/getModuleDocblock.js +0 -112
- package/dist/getModuleDocblock.js.flow +0 -118
- package/dist/src/HermesASTAdapter.js +0 -192
- package/dist/src/HermesParser.js +0 -108
- package/dist/src/HermesParserDecodeUTF8String.js +0 -68
- package/dist/src/HermesParserDeserializer.js +0 -242
- package/dist/src/HermesParserNodeDeserializers.js +0 -2477
- package/dist/src/HermesToESTreeAdapter.js +0 -439
- package/dist/src/ParserOptions.js +0 -18
- package/dist/src/babel/TransformESTreeToBabel.js +0 -1123
- package/dist/src/estree/StripFlowTypes.js +0 -175
- package/dist/src/estree/StripFlowTypesForBabel.js +0 -215
- package/dist/src/estree/TransformComponentSyntax.js +0 -788
- package/dist/src/estree/TransformEnumSyntax.js +0 -106
- package/dist/src/estree/TransformMatchSyntax.js +0 -1006
- package/dist/src/generated/ESTreeVisitorKeys.js +0 -220
- package/dist/src/generated/ParserVisitorKeys.js +0 -794
- package/dist/src/getModuleDocblock.js +0 -112
- package/dist/src/transform/SimpleTransform.js +0 -136
- package/dist/src/transform/astArrayMutationHelpers.js +0 -62
- package/dist/src/transform/astNodeMutationHelpers.js +0 -200
- package/dist/src/traverse/SimpleTraverser.js +0 -137
- package/dist/src/traverse/getVisitorKeys.js +0 -37
- package/dist/src/utils/Builders.js +0 -191
- package/dist/src/utils/GenID.js +0 -41
- package/dist/src/utils/createSyntaxError.js +0 -25
- package/dist/src/utils/mutateESTreeASTForPrettier.js +0 -127
- package/dist/transform/SimpleTransform.js +0 -136
- package/dist/transform/SimpleTransform.js.flow +0 -169
- package/dist/transform/astArrayMutationHelpers.js +0 -62
- package/dist/transform/astArrayMutationHelpers.js.flow +0 -71
- package/dist/transform/astNodeMutationHelpers.js +0 -200
- package/dist/transform/astNodeMutationHelpers.js.flow +0 -246
- package/dist/traverse/SimpleTraverser.js +0 -137
- package/dist/traverse/SimpleTraverser.js.flow +0 -133
- package/dist/traverse/getVisitorKeys.js +0 -37
- package/dist/traverse/getVisitorKeys.js.flow +0 -36
- package/dist/utils/Builders.js +0 -191
- package/dist/utils/Builders.js.flow +0 -218
- package/dist/utils/GenID.js +0 -41
- package/dist/utils/GenID.js.flow +0 -38
- package/dist/utils/createSyntaxError.js +0 -25
- package/dist/utils/createSyntaxError.js.flow +0 -24
- package/dist/utils/mutateESTreeASTForPrettier.js +0 -127
- package/dist/utils/mutateESTreeASTForPrettier.js.flow +0 -130
|
@@ -1,220 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* @format
|
|
9
|
-
* @generated
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
/*
|
|
13
|
-
* !!! GENERATED FILE !!!
|
|
14
|
-
*
|
|
15
|
-
* Any manual changes to this file will be overwritten. To regenerate run `yarn build`.
|
|
16
|
-
*/
|
|
17
|
-
// lint directives to let us do some basic validation of generated files
|
|
18
|
-
|
|
19
|
-
/* eslint no-undef: 'error', no-unused-vars: ['error', {vars: "local"}], no-redeclare: 'error' */
|
|
20
|
-
|
|
21
|
-
/* global $NonMaybeType, Partial, $ReadOnly, $ReadOnlyArray, $FlowFixMe */
|
|
22
|
-
'use strict';
|
|
23
|
-
|
|
24
|
-
module.exports = {
|
|
25
|
-
AnyTypeAnnotation: [],
|
|
26
|
-
ArrayExpression: ['elements'],
|
|
27
|
-
ArrayPattern: ['elements', 'typeAnnotation'],
|
|
28
|
-
ArrayTypeAnnotation: ['elementType'],
|
|
29
|
-
ArrowFunctionExpression: ['id', 'params', 'body', 'typeParameters', 'returnType', 'predicate'],
|
|
30
|
-
AsConstExpression: ['expression'],
|
|
31
|
-
AsExpression: ['expression', 'typeAnnotation'],
|
|
32
|
-
AssignmentExpression: ['left', 'right'],
|
|
33
|
-
AssignmentPattern: ['left', 'right'],
|
|
34
|
-
AwaitExpression: ['argument'],
|
|
35
|
-
BigIntLiteralTypeAnnotation: [],
|
|
36
|
-
BigIntTypeAnnotation: [],
|
|
37
|
-
BinaryExpression: ['left', 'right'],
|
|
38
|
-
BlockStatement: ['body'],
|
|
39
|
-
BooleanLiteralTypeAnnotation: [],
|
|
40
|
-
BooleanTypeAnnotation: [],
|
|
41
|
-
BreakStatement: ['label'],
|
|
42
|
-
CallExpression: ['callee', 'typeArguments', 'arguments'],
|
|
43
|
-
CatchClause: ['param', 'body'],
|
|
44
|
-
ChainExpression: ['expression'],
|
|
45
|
-
ClassBody: ['body'],
|
|
46
|
-
ClassDeclaration: ['id', 'typeParameters', 'superClass', 'superTypeParameters', 'implements', 'decorators', 'body'],
|
|
47
|
-
ClassExpression: ['id', 'typeParameters', 'superClass', 'superTypeParameters', 'implements', 'decorators', 'body'],
|
|
48
|
-
ClassImplements: ['id', 'typeParameters'],
|
|
49
|
-
ComponentDeclaration: ['id', 'params', 'body', 'typeParameters', 'rendersType'],
|
|
50
|
-
ComponentParameter: ['name', 'local'],
|
|
51
|
-
ComponentTypeAnnotation: ['params', 'rest', 'typeParameters', 'rendersType'],
|
|
52
|
-
ComponentTypeParameter: ['name', 'typeAnnotation'],
|
|
53
|
-
ConditionalExpression: ['test', 'consequent', 'alternate'],
|
|
54
|
-
ConditionalTypeAnnotation: ['checkType', 'extendsType', 'trueType', 'falseType'],
|
|
55
|
-
ContinueStatement: ['label'],
|
|
56
|
-
DebuggerStatement: [],
|
|
57
|
-
DeclareClass: ['id', 'typeParameters', 'extends', 'implements', 'mixins', 'body'],
|
|
58
|
-
DeclareComponent: ['id', 'params', 'rest', 'typeParameters', 'rendersType'],
|
|
59
|
-
DeclaredPredicate: ['value'],
|
|
60
|
-
DeclareEnum: ['id', 'body'],
|
|
61
|
-
DeclareExportAllDeclaration: ['source'],
|
|
62
|
-
DeclareExportDeclaration: ['declaration', 'specifiers', 'source'],
|
|
63
|
-
DeclareFunction: ['id', 'predicate'],
|
|
64
|
-
DeclareHook: ['id'],
|
|
65
|
-
DeclareInterface: ['id', 'typeParameters', 'extends', 'body'],
|
|
66
|
-
DeclareModule: ['id', 'body'],
|
|
67
|
-
DeclareModuleExports: ['typeAnnotation'],
|
|
68
|
-
DeclareNamespace: ['id', 'body'],
|
|
69
|
-
DeclareOpaqueType: ['id', 'typeParameters', 'impltype', 'lowerBound', 'upperBound', 'supertype'],
|
|
70
|
-
DeclareTypeAlias: ['id', 'typeParameters', 'right'],
|
|
71
|
-
DeclareVariable: ['id'],
|
|
72
|
-
DoWhileStatement: ['body', 'test'],
|
|
73
|
-
EmptyStatement: [],
|
|
74
|
-
EmptyTypeAnnotation: [],
|
|
75
|
-
EnumBigIntBody: ['members'],
|
|
76
|
-
EnumBigIntMember: ['id', 'init'],
|
|
77
|
-
EnumBooleanBody: ['members'],
|
|
78
|
-
EnumBooleanMember: ['id', 'init'],
|
|
79
|
-
EnumDeclaration: ['id', 'body'],
|
|
80
|
-
EnumDefaultedMember: ['id'],
|
|
81
|
-
EnumNumberBody: ['members'],
|
|
82
|
-
EnumNumberMember: ['id', 'init'],
|
|
83
|
-
EnumStringBody: ['members'],
|
|
84
|
-
EnumStringMember: ['id', 'init'],
|
|
85
|
-
EnumSymbolBody: ['members'],
|
|
86
|
-
ExistsTypeAnnotation: [],
|
|
87
|
-
ExportAllDeclaration: ['exported', 'source'],
|
|
88
|
-
ExportDefaultDeclaration: ['declaration'],
|
|
89
|
-
ExportNamedDeclaration: ['declaration', 'specifiers', 'source'],
|
|
90
|
-
ExportSpecifier: ['exported', 'local'],
|
|
91
|
-
ExpressionStatement: ['expression'],
|
|
92
|
-
ForInStatement: ['left', 'right', 'body'],
|
|
93
|
-
ForOfStatement: ['left', 'right', 'body'],
|
|
94
|
-
ForStatement: ['init', 'test', 'update', 'body'],
|
|
95
|
-
FunctionDeclaration: ['id', 'params', 'body', 'typeParameters', 'returnType', 'predicate'],
|
|
96
|
-
FunctionExpression: ['id', 'params', 'body', 'typeParameters', 'returnType', 'predicate'],
|
|
97
|
-
FunctionTypeAnnotation: ['params', 'this', 'returnType', 'rest', 'typeParameters'],
|
|
98
|
-
FunctionTypeParam: ['name', 'typeAnnotation'],
|
|
99
|
-
GenericTypeAnnotation: ['id', 'typeParameters'],
|
|
100
|
-
HookDeclaration: ['id', 'params', 'body', 'typeParameters', 'returnType'],
|
|
101
|
-
HookTypeAnnotation: ['params', 'returnType', 'rest', 'typeParameters'],
|
|
102
|
-
Identifier: ['typeAnnotation'],
|
|
103
|
-
IfStatement: ['test', 'consequent', 'alternate'],
|
|
104
|
-
ImportAttribute: ['key', 'value'],
|
|
105
|
-
ImportDeclaration: ['specifiers', 'source', 'assertions'],
|
|
106
|
-
ImportDefaultSpecifier: ['local'],
|
|
107
|
-
ImportExpression: ['source', 'options'],
|
|
108
|
-
ImportNamespaceSpecifier: ['local'],
|
|
109
|
-
ImportSpecifier: ['imported', 'local'],
|
|
110
|
-
IndexedAccessType: ['objectType', 'indexType'],
|
|
111
|
-
InferredPredicate: [],
|
|
112
|
-
InferTypeAnnotation: ['typeParameter'],
|
|
113
|
-
InterfaceDeclaration: ['id', 'typeParameters', 'extends', 'body'],
|
|
114
|
-
InterfaceExtends: ['id', 'typeParameters'],
|
|
115
|
-
InterfaceTypeAnnotation: ['extends', 'body'],
|
|
116
|
-
IntersectionTypeAnnotation: ['types'],
|
|
117
|
-
JSXAttribute: ['name', 'value'],
|
|
118
|
-
JSXClosingElement: ['name'],
|
|
119
|
-
JSXClosingFragment: [],
|
|
120
|
-
JSXElement: ['openingElement', 'children', 'closingElement'],
|
|
121
|
-
JSXEmptyExpression: [],
|
|
122
|
-
JSXExpressionContainer: ['expression'],
|
|
123
|
-
JSXFragment: ['openingFragment', 'children', 'closingFragment'],
|
|
124
|
-
JSXIdentifier: [],
|
|
125
|
-
JSXMemberExpression: ['object', 'property'],
|
|
126
|
-
JSXNamespacedName: ['namespace', 'name'],
|
|
127
|
-
JSXOpeningElement: ['name', 'attributes', 'typeArguments'],
|
|
128
|
-
JSXOpeningFragment: [],
|
|
129
|
-
JSXSpreadAttribute: ['argument'],
|
|
130
|
-
JSXSpreadChild: ['expression'],
|
|
131
|
-
JSXText: [],
|
|
132
|
-
KeyofTypeAnnotation: ['argument'],
|
|
133
|
-
LabeledStatement: ['label', 'body'],
|
|
134
|
-
LogicalExpression: ['left', 'right'],
|
|
135
|
-
MatchArrayPattern: ['elements', 'rest'],
|
|
136
|
-
MatchAsPattern: ['pattern', 'target'],
|
|
137
|
-
MatchBindingPattern: ['id'],
|
|
138
|
-
MatchExpression: ['argument', 'cases'],
|
|
139
|
-
MatchExpressionCase: ['pattern', 'body', 'guard'],
|
|
140
|
-
MatchIdentifierPattern: ['id'],
|
|
141
|
-
MatchLiteralPattern: ['literal'],
|
|
142
|
-
MatchMemberPattern: ['base', 'property'],
|
|
143
|
-
MatchObjectPattern: ['properties', 'rest'],
|
|
144
|
-
MatchObjectPatternProperty: ['key', 'pattern'],
|
|
145
|
-
MatchOrPattern: ['patterns'],
|
|
146
|
-
MatchRestPattern: ['argument'],
|
|
147
|
-
MatchStatement: ['argument', 'cases'],
|
|
148
|
-
MatchStatementCase: ['pattern', 'body', 'guard'],
|
|
149
|
-
MatchUnaryPattern: ['argument'],
|
|
150
|
-
MatchWildcardPattern: [],
|
|
151
|
-
MemberExpression: ['object', 'property'],
|
|
152
|
-
MetaProperty: ['meta', 'property'],
|
|
153
|
-
MethodDefinition: ['key', 'value'],
|
|
154
|
-
MixedTypeAnnotation: [],
|
|
155
|
-
NewExpression: ['callee', 'typeArguments', 'arguments'],
|
|
156
|
-
NullableTypeAnnotation: ['typeAnnotation'],
|
|
157
|
-
NullLiteralTypeAnnotation: [],
|
|
158
|
-
NumberLiteralTypeAnnotation: [],
|
|
159
|
-
NumberTypeAnnotation: [],
|
|
160
|
-
ObjectExpression: ['properties'],
|
|
161
|
-
ObjectPattern: ['properties', 'typeAnnotation'],
|
|
162
|
-
ObjectTypeAnnotation: ['properties', 'indexers', 'callProperties', 'internalSlots'],
|
|
163
|
-
ObjectTypeCallProperty: ['value'],
|
|
164
|
-
ObjectTypeIndexer: ['id', 'key', 'value', 'variance'],
|
|
165
|
-
ObjectTypeInternalSlot: ['id', 'value'],
|
|
166
|
-
ObjectTypeMappedTypeProperty: ['keyTparam', 'propType', 'sourceType', 'variance'],
|
|
167
|
-
ObjectTypeProperty: ['key', 'value', 'variance'],
|
|
168
|
-
ObjectTypeSpreadProperty: ['argument'],
|
|
169
|
-
OpaqueType: ['id', 'typeParameters', 'impltype', 'lowerBound', 'upperBound', 'supertype'],
|
|
170
|
-
OptionalIndexedAccessType: ['objectType', 'indexType'],
|
|
171
|
-
PrivateIdentifier: [],
|
|
172
|
-
Program: ['body'],
|
|
173
|
-
Property: ['key', 'value'],
|
|
174
|
-
PropertyDefinition: ['key', 'value', 'variance', 'typeAnnotation'],
|
|
175
|
-
QualifiedTypeIdentifier: ['qualification', 'id'],
|
|
176
|
-
QualifiedTypeofIdentifier: ['qualification', 'id'],
|
|
177
|
-
RestElement: ['argument'],
|
|
178
|
-
ReturnStatement: ['argument'],
|
|
179
|
-
SequenceExpression: ['expressions'],
|
|
180
|
-
SpreadElement: ['argument'],
|
|
181
|
-
StaticBlock: ['body'],
|
|
182
|
-
StringLiteralTypeAnnotation: [],
|
|
183
|
-
StringTypeAnnotation: [],
|
|
184
|
-
Super: [],
|
|
185
|
-
SwitchCase: ['test', 'consequent'],
|
|
186
|
-
SwitchStatement: ['discriminant', 'cases'],
|
|
187
|
-
SymbolTypeAnnotation: [],
|
|
188
|
-
TaggedTemplateExpression: ['tag', 'quasi'],
|
|
189
|
-
TemplateElement: [],
|
|
190
|
-
TemplateLiteral: ['quasis', 'expressions'],
|
|
191
|
-
ThisExpression: [],
|
|
192
|
-
ThisTypeAnnotation: [],
|
|
193
|
-
ThrowStatement: ['argument'],
|
|
194
|
-
TryStatement: ['block', 'handler', 'finalizer'],
|
|
195
|
-
TupleTypeAnnotation: ['types'],
|
|
196
|
-
TupleTypeLabeledElement: ['label', 'elementType', 'variance'],
|
|
197
|
-
TupleTypeSpreadElement: ['label', 'typeAnnotation'],
|
|
198
|
-
TypeAlias: ['id', 'typeParameters', 'right'],
|
|
199
|
-
TypeAnnotation: ['typeAnnotation'],
|
|
200
|
-
TypeCastExpression: ['expression', 'typeAnnotation'],
|
|
201
|
-
TypeofTypeAnnotation: ['argument', 'typeArguments'],
|
|
202
|
-
TypeOperator: ['typeAnnotation'],
|
|
203
|
-
TypeParameter: ['bound', 'variance', 'default'],
|
|
204
|
-
TypeParameterDeclaration: ['params'],
|
|
205
|
-
TypeParameterInstantiation: ['params'],
|
|
206
|
-
TypePredicate: ['parameterName', 'typeAnnotation'],
|
|
207
|
-
UnaryExpression: ['argument'],
|
|
208
|
-
UnionTypeAnnotation: ['types'],
|
|
209
|
-
UpdateExpression: ['argument'],
|
|
210
|
-
VariableDeclaration: ['declarations'],
|
|
211
|
-
VariableDeclarator: ['id', 'init'],
|
|
212
|
-
Variance: [],
|
|
213
|
-
VoidTypeAnnotation: [],
|
|
214
|
-
WhileStatement: ['test', 'body'],
|
|
215
|
-
WithStatement: ['object', 'body'],
|
|
216
|
-
YieldExpression: ['argument'],
|
|
217
|
-
OptionalMemberExpression: ['object', 'property'],
|
|
218
|
-
OptionalCallExpression: ['callee', 'typeArguments', 'arguments'],
|
|
219
|
-
Literal: []
|
|
220
|
-
};
|