ast-types 0.13.4 → 0.15.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/.github/workflows/main.yml +1 -1
- package/README.md +1 -1
- package/def/babel-core.js +20 -59
- package/def/babel.js +15 -2
- package/def/core.js +8 -8
- package/def/es-proposals.js +49 -20
- package/def/{es7.d.ts → es2016.d.ts} +0 -0
- package/def/es2016.js +14 -0
- package/def/es2017.d.ts +2 -0
- package/def/es2017.js +20 -0
- package/def/es2018.d.ts +2 -0
- package/def/{es7.js → es2018.js} +13 -13
- package/def/es2019.d.ts +2 -0
- package/def/es2019.js +17 -0
- package/def/es2020.js +36 -3
- package/def/es2021.d.ts +2 -0
- package/def/es2021.js +13 -0
- package/def/es2022.d.ts +2 -0
- package/def/es2022.js +16 -0
- package/def/es6.js +48 -22
- package/def/esprima.js +4 -4
- package/def/flow.js +85 -17
- package/def/jsx.js +27 -22
- package/def/operators/core.d.ts +5 -0
- package/def/operators/core.js +25 -0
- package/def/operators/es2016.d.ts +5 -0
- package/def/operators/es2016.js +19 -0
- package/def/operators/es2020.d.ts +5 -0
- package/def/operators/es2020.js +15 -0
- package/def/operators/es2021.d.ts +5 -0
- package/def/operators/es2021.js +18 -0
- package/def/type-annotations.js +2 -2
- package/def/typescript.js +11 -4
- package/fork.js +5 -5
- package/gen/builders.d.ts +489 -258
- package/gen/kinds.d.ts +61 -36
- package/gen/namedTypes.d.ts +334 -166
- package/gen/visitor.d.ts +47 -22
- package/lib/equiv.js +1 -1
- package/lib/node-path.js +3 -3
- package/lib/path-visitor.js +2 -2
- package/lib/path.d.ts +3 -3
- package/lib/path.js +1 -1
- package/lib/scope.d.ts +3 -2
- package/lib/scope.js +63 -26
- package/lib/shared.js +1 -1
- package/lib/types.js +6 -6
- package/main.js +9 -19
- package/package.json +15 -15
package/gen/visitor.d.ts
CHANGED
|
@@ -47,6 +47,7 @@ export interface Visitor<M = {}> {
|
|
|
47
47
|
visitUnaryExpression?(this: Context & M, path: NodePath<namedTypes.UnaryExpression>): any;
|
|
48
48
|
visitBinaryExpression?(this: Context & M, path: NodePath<namedTypes.BinaryExpression>): any;
|
|
49
49
|
visitAssignmentExpression?(this: Context & M, path: NodePath<namedTypes.AssignmentExpression>): any;
|
|
50
|
+
visitChainElement?(this: Context & M, path: NodePath<namedTypes.ChainElement>): any;
|
|
50
51
|
visitMemberExpression?(this: Context & M, path: NodePath<namedTypes.MemberExpression>): any;
|
|
51
52
|
visitUpdateExpression?(this: Context & M, path: NodePath<namedTypes.UpdateExpression>): any;
|
|
52
53
|
visitLogicalExpression?(this: Context & M, path: NodePath<namedTypes.LogicalExpression>): any;
|
|
@@ -67,42 +68,60 @@ export interface Visitor<M = {}> {
|
|
|
67
68
|
visitPropertyPattern?(this: Context & M, path: NodePath<namedTypes.PropertyPattern>): any;
|
|
68
69
|
visitObjectPattern?(this: Context & M, path: NodePath<namedTypes.ObjectPattern>): any;
|
|
69
70
|
visitArrayPattern?(this: Context & M, path: NodePath<namedTypes.ArrayPattern>): any;
|
|
70
|
-
visitMethodDefinition?(this: Context & M, path: NodePath<namedTypes.MethodDefinition>): any;
|
|
71
71
|
visitSpreadElement?(this: Context & M, path: NodePath<namedTypes.SpreadElement>): any;
|
|
72
72
|
visitAssignmentPattern?(this: Context & M, path: NodePath<namedTypes.AssignmentPattern>): any;
|
|
73
|
+
visitMethodDefinition?(this: Context & M, path: NodePath<namedTypes.MethodDefinition>): any;
|
|
73
74
|
visitClassPropertyDefinition?(this: Context & M, path: NodePath<namedTypes.ClassPropertyDefinition>): any;
|
|
74
75
|
visitClassProperty?(this: Context & M, path: NodePath<namedTypes.ClassProperty>): any;
|
|
75
76
|
visitClassBody?(this: Context & M, path: NodePath<namedTypes.ClassBody>): any;
|
|
76
77
|
visitClassDeclaration?(this: Context & M, path: NodePath<namedTypes.ClassDeclaration>): any;
|
|
77
78
|
visitClassExpression?(this: Context & M, path: NodePath<namedTypes.ClassExpression>): any;
|
|
79
|
+
visitSuper?(this: Context & M, path: NodePath<namedTypes.Super>): any;
|
|
78
80
|
visitSpecifier?(this: Context & M, path: NodePath<namedTypes.Specifier>): any;
|
|
79
81
|
visitModuleSpecifier?(this: Context & M, path: NodePath<namedTypes.ModuleSpecifier>): any;
|
|
80
82
|
visitImportSpecifier?(this: Context & M, path: NodePath<namedTypes.ImportSpecifier>): any;
|
|
81
|
-
visitImportNamespaceSpecifier?(this: Context & M, path: NodePath<namedTypes.ImportNamespaceSpecifier>): any;
|
|
82
83
|
visitImportDefaultSpecifier?(this: Context & M, path: NodePath<namedTypes.ImportDefaultSpecifier>): any;
|
|
84
|
+
visitImportNamespaceSpecifier?(this: Context & M, path: NodePath<namedTypes.ImportNamespaceSpecifier>): any;
|
|
83
85
|
visitImportDeclaration?(this: Context & M, path: NodePath<namedTypes.ImportDeclaration>): any;
|
|
86
|
+
visitExportNamedDeclaration?(this: Context & M, path: NodePath<namedTypes.ExportNamedDeclaration>): any;
|
|
87
|
+
visitExportSpecifier?(this: Context & M, path: NodePath<namedTypes.ExportSpecifier>): any;
|
|
88
|
+
visitExportDefaultDeclaration?(this: Context & M, path: NodePath<namedTypes.ExportDefaultDeclaration>): any;
|
|
89
|
+
visitExportAllDeclaration?(this: Context & M, path: NodePath<namedTypes.ExportAllDeclaration>): any;
|
|
84
90
|
visitTaggedTemplateExpression?(this: Context & M, path: NodePath<namedTypes.TaggedTemplateExpression>): any;
|
|
85
91
|
visitTemplateLiteral?(this: Context & M, path: NodePath<namedTypes.TemplateLiteral>): any;
|
|
86
92
|
visitTemplateElement?(this: Context & M, path: NodePath<namedTypes.TemplateElement>): any;
|
|
93
|
+
visitMetaProperty?(this: Context & M, path: NodePath<namedTypes.MetaProperty>): any;
|
|
94
|
+
visitAwaitExpression?(this: Context & M, path: NodePath<namedTypes.AwaitExpression>): any;
|
|
87
95
|
visitSpreadProperty?(this: Context & M, path: NodePath<namedTypes.SpreadProperty>): any;
|
|
88
96
|
visitSpreadPropertyPattern?(this: Context & M, path: NodePath<namedTypes.SpreadPropertyPattern>): any;
|
|
89
|
-
visitAwaitExpression?(this: Context & M, path: NodePath<namedTypes.AwaitExpression>): any;
|
|
90
97
|
visitImportExpression?(this: Context & M, path: NodePath<namedTypes.ImportExpression>): any;
|
|
98
|
+
visitChainExpression?(this: Context & M, path: NodePath<namedTypes.ChainExpression>): any;
|
|
99
|
+
visitOptionalCallExpression?(this: Context & M, path: NodePath<namedTypes.OptionalCallExpression>): any;
|
|
100
|
+
visitOptionalMemberExpression?(this: Context & M, path: NodePath<namedTypes.OptionalMemberExpression>): any;
|
|
101
|
+
visitStaticBlock?(this: Context & M, path: NodePath<namedTypes.StaticBlock>): any;
|
|
102
|
+
visitDecorator?(this: Context & M, path: NodePath<namedTypes.Decorator>): any;
|
|
103
|
+
visitPrivateName?(this: Context & M, path: NodePath<namedTypes.PrivateName>): any;
|
|
104
|
+
visitClassPrivateProperty?(this: Context & M, path: NodePath<namedTypes.ClassPrivateProperty>): any;
|
|
105
|
+
visitImportAttribute?(this: Context & M, path: NodePath<namedTypes.ImportAttribute>): any;
|
|
106
|
+
visitRecordExpression?(this: Context & M, path: NodePath<namedTypes.RecordExpression>): any;
|
|
107
|
+
visitObjectMethod?(this: Context & M, path: NodePath<namedTypes.ObjectMethod>): any;
|
|
108
|
+
visitTupleExpression?(this: Context & M, path: NodePath<namedTypes.TupleExpression>): any;
|
|
109
|
+
visitModuleExpression?(this: Context & M, path: NodePath<namedTypes.ModuleExpression>): any;
|
|
91
110
|
visitJSXAttribute?(this: Context & M, path: NodePath<namedTypes.JSXAttribute>): any;
|
|
92
111
|
visitJSXIdentifier?(this: Context & M, path: NodePath<namedTypes.JSXIdentifier>): any;
|
|
93
112
|
visitJSXNamespacedName?(this: Context & M, path: NodePath<namedTypes.JSXNamespacedName>): any;
|
|
94
113
|
visitJSXExpressionContainer?(this: Context & M, path: NodePath<namedTypes.JSXExpressionContainer>): any;
|
|
114
|
+
visitJSXElement?(this: Context & M, path: NodePath<namedTypes.JSXElement>): any;
|
|
115
|
+
visitJSXFragment?(this: Context & M, path: NodePath<namedTypes.JSXFragment>): any;
|
|
95
116
|
visitJSXMemberExpression?(this: Context & M, path: NodePath<namedTypes.JSXMemberExpression>): any;
|
|
96
117
|
visitJSXSpreadAttribute?(this: Context & M, path: NodePath<namedTypes.JSXSpreadAttribute>): any;
|
|
97
|
-
|
|
118
|
+
visitJSXEmptyExpression?(this: Context & M, path: NodePath<namedTypes.JSXEmptyExpression>): any;
|
|
119
|
+
visitJSXText?(this: Context & M, path: NodePath<namedTypes.JSXText>): any;
|
|
120
|
+
visitJSXSpreadChild?(this: Context & M, path: NodePath<namedTypes.JSXSpreadChild>): any;
|
|
98
121
|
visitJSXOpeningElement?(this: Context & M, path: NodePath<namedTypes.JSXOpeningElement>): any;
|
|
99
122
|
visitJSXClosingElement?(this: Context & M, path: NodePath<namedTypes.JSXClosingElement>): any;
|
|
100
|
-
visitJSXFragment?(this: Context & M, path: NodePath<namedTypes.JSXFragment>): any;
|
|
101
|
-
visitJSXText?(this: Context & M, path: NodePath<namedTypes.JSXText>): any;
|
|
102
123
|
visitJSXOpeningFragment?(this: Context & M, path: NodePath<namedTypes.JSXOpeningFragment>): any;
|
|
103
124
|
visitJSXClosingFragment?(this: Context & M, path: NodePath<namedTypes.JSXClosingFragment>): any;
|
|
104
|
-
visitJSXEmptyExpression?(this: Context & M, path: NodePath<namedTypes.JSXEmptyExpression>): any;
|
|
105
|
-
visitJSXSpreadChild?(this: Context & M, path: NodePath<namedTypes.JSXSpreadChild>): any;
|
|
106
125
|
visitTypeParameterDeclaration?(this: Context & M, path: NodePath<namedTypes.TypeParameterDeclaration>): any;
|
|
107
126
|
visitTSTypeParameterDeclaration?(this: Context & M, path: NodePath<namedTypes.TSTypeParameterDeclaration>): any;
|
|
108
127
|
visitTypeParameterInstantiation?(this: Context & M, path: NodePath<namedTypes.TypeParameterInstantiation>): any;
|
|
@@ -117,9 +136,12 @@ export interface Visitor<M = {}> {
|
|
|
117
136
|
visitEmptyTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.EmptyTypeAnnotation>): any;
|
|
118
137
|
visitMixedTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.MixedTypeAnnotation>): any;
|
|
119
138
|
visitVoidTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.VoidTypeAnnotation>): any;
|
|
139
|
+
visitSymbolTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.SymbolTypeAnnotation>): any;
|
|
120
140
|
visitNumberTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.NumberTypeAnnotation>): any;
|
|
141
|
+
visitBigIntTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.BigIntTypeAnnotation>): any;
|
|
121
142
|
visitNumberLiteralTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.NumberLiteralTypeAnnotation>): any;
|
|
122
143
|
visitNumericLiteralTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.NumericLiteralTypeAnnotation>): any;
|
|
144
|
+
visitBigIntLiteralTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.BigIntLiteralTypeAnnotation>): any;
|
|
123
145
|
visitStringTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.StringTypeAnnotation>): any;
|
|
124
146
|
visitStringLiteralTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.StringLiteralTypeAnnotation>): any;
|
|
125
147
|
visitBooleanTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.BooleanTypeAnnotation>): any;
|
|
@@ -143,6 +165,8 @@ export interface Visitor<M = {}> {
|
|
|
143
165
|
visitQualifiedTypeIdentifier?(this: Context & M, path: NodePath<namedTypes.QualifiedTypeIdentifier>): any;
|
|
144
166
|
visitGenericTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.GenericTypeAnnotation>): any;
|
|
145
167
|
visitMemberTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.MemberTypeAnnotation>): any;
|
|
168
|
+
visitIndexedAccessType?(this: Context & M, path: NodePath<namedTypes.IndexedAccessType>): any;
|
|
169
|
+
visitOptionalIndexedAccessType?(this: Context & M, path: NodePath<namedTypes.OptionalIndexedAccessType>): any;
|
|
146
170
|
visitUnionTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.UnionTypeAnnotation>): any;
|
|
147
171
|
visitIntersectionTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.IntersectionTypeAnnotation>): any;
|
|
148
172
|
visitTypeofTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.TypeofTypeAnnotation>): any;
|
|
@@ -152,38 +176,40 @@ export interface Visitor<M = {}> {
|
|
|
152
176
|
visitInterfaceDeclaration?(this: Context & M, path: NodePath<namedTypes.InterfaceDeclaration>): any;
|
|
153
177
|
visitDeclareInterface?(this: Context & M, path: NodePath<namedTypes.DeclareInterface>): any;
|
|
154
178
|
visitTypeAlias?(this: Context & M, path: NodePath<namedTypes.TypeAlias>): any;
|
|
155
|
-
visitOpaqueType?(this: Context & M, path: NodePath<namedTypes.OpaqueType>): any;
|
|
156
179
|
visitDeclareTypeAlias?(this: Context & M, path: NodePath<namedTypes.DeclareTypeAlias>): any;
|
|
180
|
+
visitOpaqueType?(this: Context & M, path: NodePath<namedTypes.OpaqueType>): any;
|
|
157
181
|
visitDeclareOpaqueType?(this: Context & M, path: NodePath<namedTypes.DeclareOpaqueType>): any;
|
|
158
182
|
visitTypeCastExpression?(this: Context & M, path: NodePath<namedTypes.TypeCastExpression>): any;
|
|
159
183
|
visitTupleTypeAnnotation?(this: Context & M, path: NodePath<namedTypes.TupleTypeAnnotation>): any;
|
|
160
184
|
visitDeclareVariable?(this: Context & M, path: NodePath<namedTypes.DeclareVariable>): any;
|
|
161
185
|
visitDeclareFunction?(this: Context & M, path: NodePath<namedTypes.DeclareFunction>): any;
|
|
186
|
+
visitFlowPredicate?(this: Context & M, path: NodePath<namedTypes.FlowPredicate>): any;
|
|
162
187
|
visitDeclareClass?(this: Context & M, path: NodePath<namedTypes.DeclareClass>): any;
|
|
163
188
|
visitDeclareModule?(this: Context & M, path: NodePath<namedTypes.DeclareModule>): any;
|
|
164
189
|
visitDeclareModuleExports?(this: Context & M, path: NodePath<namedTypes.DeclareModuleExports>): any;
|
|
165
190
|
visitDeclareExportDeclaration?(this: Context & M, path: NodePath<namedTypes.DeclareExportDeclaration>): any;
|
|
166
|
-
visitExportSpecifier?(this: Context & M, path: NodePath<namedTypes.ExportSpecifier>): any;
|
|
167
191
|
visitExportBatchSpecifier?(this: Context & M, path: NodePath<namedTypes.ExportBatchSpecifier>): any;
|
|
168
192
|
visitDeclareExportAllDeclaration?(this: Context & M, path: NodePath<namedTypes.DeclareExportAllDeclaration>): any;
|
|
169
|
-
visitFlowPredicate?(this: Context & M, path: NodePath<namedTypes.FlowPredicate>): any;
|
|
170
193
|
visitInferredPredicate?(this: Context & M, path: NodePath<namedTypes.InferredPredicate>): any;
|
|
171
194
|
visitDeclaredPredicate?(this: Context & M, path: NodePath<namedTypes.DeclaredPredicate>): any;
|
|
195
|
+
visitEnumDeclaration?(this: Context & M, path: NodePath<namedTypes.EnumDeclaration>): any;
|
|
196
|
+
visitEnumBooleanBody?(this: Context & M, path: NodePath<namedTypes.EnumBooleanBody>): any;
|
|
197
|
+
visitEnumNumberBody?(this: Context & M, path: NodePath<namedTypes.EnumNumberBody>): any;
|
|
198
|
+
visitEnumStringBody?(this: Context & M, path: NodePath<namedTypes.EnumStringBody>): any;
|
|
199
|
+
visitEnumSymbolBody?(this: Context & M, path: NodePath<namedTypes.EnumSymbolBody>): any;
|
|
200
|
+
visitEnumBooleanMember?(this: Context & M, path: NodePath<namedTypes.EnumBooleanMember>): any;
|
|
201
|
+
visitEnumNumberMember?(this: Context & M, path: NodePath<namedTypes.EnumNumberMember>): any;
|
|
202
|
+
visitEnumStringMember?(this: Context & M, path: NodePath<namedTypes.EnumStringMember>): any;
|
|
203
|
+
visitEnumDefaultedMember?(this: Context & M, path: NodePath<namedTypes.EnumDefaultedMember>): any;
|
|
172
204
|
visitExportDeclaration?(this: Context & M, path: NodePath<namedTypes.ExportDeclaration>): any;
|
|
173
205
|
visitBlock?(this: Context & M, path: NodePath<namedTypes.Block>): any;
|
|
174
206
|
visitLine?(this: Context & M, path: NodePath<namedTypes.Line>): any;
|
|
175
207
|
visitNoop?(this: Context & M, path: NodePath<namedTypes.Noop>): any;
|
|
176
208
|
visitDoExpression?(this: Context & M, path: NodePath<namedTypes.DoExpression>): any;
|
|
177
|
-
visitSuper?(this: Context & M, path: NodePath<namedTypes.Super>): any;
|
|
178
209
|
visitBindExpression?(this: Context & M, path: NodePath<namedTypes.BindExpression>): any;
|
|
179
|
-
visitDecorator?(this: Context & M, path: NodePath<namedTypes.Decorator>): any;
|
|
180
|
-
visitMetaProperty?(this: Context & M, path: NodePath<namedTypes.MetaProperty>): any;
|
|
181
210
|
visitParenthesizedExpression?(this: Context & M, path: NodePath<namedTypes.ParenthesizedExpression>): any;
|
|
182
|
-
visitExportDefaultDeclaration?(this: Context & M, path: NodePath<namedTypes.ExportDefaultDeclaration>): any;
|
|
183
|
-
visitExportNamedDeclaration?(this: Context & M, path: NodePath<namedTypes.ExportNamedDeclaration>): any;
|
|
184
211
|
visitExportNamespaceSpecifier?(this: Context & M, path: NodePath<namedTypes.ExportNamespaceSpecifier>): any;
|
|
185
212
|
visitExportDefaultSpecifier?(this: Context & M, path: NodePath<namedTypes.ExportDefaultSpecifier>): any;
|
|
186
|
-
visitExportAllDeclaration?(this: Context & M, path: NodePath<namedTypes.ExportAllDeclaration>): any;
|
|
187
213
|
visitCommentBlock?(this: Context & M, path: NodePath<namedTypes.CommentBlock>): any;
|
|
188
214
|
visitCommentLine?(this: Context & M, path: NodePath<namedTypes.CommentLine>): any;
|
|
189
215
|
visitDirective?(this: Context & M, path: NodePath<namedTypes.Directive>): any;
|
|
@@ -192,17 +218,17 @@ export interface Visitor<M = {}> {
|
|
|
192
218
|
visitStringLiteral?(this: Context & M, path: NodePath<namedTypes.StringLiteral>): any;
|
|
193
219
|
visitNumericLiteral?(this: Context & M, path: NodePath<namedTypes.NumericLiteral>): any;
|
|
194
220
|
visitBigIntLiteral?(this: Context & M, path: NodePath<namedTypes.BigIntLiteral>): any;
|
|
221
|
+
visitDecimalLiteral?(this: Context & M, path: NodePath<namedTypes.DecimalLiteral>): any;
|
|
195
222
|
visitNullLiteral?(this: Context & M, path: NodePath<namedTypes.NullLiteral>): any;
|
|
196
223
|
visitBooleanLiteral?(this: Context & M, path: NodePath<namedTypes.BooleanLiteral>): any;
|
|
197
224
|
visitRegExpLiteral?(this: Context & M, path: NodePath<namedTypes.RegExpLiteral>): any;
|
|
198
|
-
visitObjectMethod?(this: Context & M, path: NodePath<namedTypes.ObjectMethod>): any;
|
|
199
|
-
visitClassPrivateProperty?(this: Context & M, path: NodePath<namedTypes.ClassPrivateProperty>): any;
|
|
200
225
|
visitClassMethod?(this: Context & M, path: NodePath<namedTypes.ClassMethod>): any;
|
|
201
226
|
visitClassPrivateMethod?(this: Context & M, path: NodePath<namedTypes.ClassPrivateMethod>): any;
|
|
202
|
-
visitPrivateName?(this: Context & M, path: NodePath<namedTypes.PrivateName>): any;
|
|
203
227
|
visitRestProperty?(this: Context & M, path: NodePath<namedTypes.RestProperty>): any;
|
|
204
228
|
visitForAwaitStatement?(this: Context & M, path: NodePath<namedTypes.ForAwaitStatement>): any;
|
|
205
229
|
visitImport?(this: Context & M, path: NodePath<namedTypes.Import>): any;
|
|
230
|
+
visitV8IntrinsicIdentifier?(this: Context & M, path: NodePath<namedTypes.V8IntrinsicIdentifier>): any;
|
|
231
|
+
visitTopicReference?(this: Context & M, path: NodePath<namedTypes.TopicReference>): any;
|
|
206
232
|
visitTSQualifiedName?(this: Context & M, path: NodePath<namedTypes.TSQualifiedName>): any;
|
|
207
233
|
visitTSTypeReference?(this: Context & M, path: NodePath<namedTypes.TSTypeReference>): any;
|
|
208
234
|
visitTSHasOptionalTypeParameters?(this: Context & M, path: NodePath<namedTypes.TSHasOptionalTypeParameters>): any;
|
|
@@ -221,6 +247,7 @@ export interface Visitor<M = {}> {
|
|
|
221
247
|
visitTSUndefinedKeyword?(this: Context & M, path: NodePath<namedTypes.TSUndefinedKeyword>): any;
|
|
222
248
|
visitTSUnknownKeyword?(this: Context & M, path: NodePath<namedTypes.TSUnknownKeyword>): any;
|
|
223
249
|
visitTSVoidKeyword?(this: Context & M, path: NodePath<namedTypes.TSVoidKeyword>): any;
|
|
250
|
+
visitTSIntrinsicKeyword?(this: Context & M, path: NodePath<namedTypes.TSIntrinsicKeyword>): any;
|
|
224
251
|
visitTSThisType?(this: Context & M, path: NodePath<namedTypes.TSThisType>): any;
|
|
225
252
|
visitTSArrayType?(this: Context & M, path: NodePath<namedTypes.TSArrayType>): any;
|
|
226
253
|
visitTSLiteralType?(this: Context & M, path: NodePath<namedTypes.TSLiteralType>): any;
|
|
@@ -263,6 +290,4 @@ export interface Visitor<M = {}> {
|
|
|
263
290
|
visitTSInterfaceBody?(this: Context & M, path: NodePath<namedTypes.TSInterfaceBody>): any;
|
|
264
291
|
visitTSInterfaceDeclaration?(this: Context & M, path: NodePath<namedTypes.TSInterfaceDeclaration>): any;
|
|
265
292
|
visitTSParameterProperty?(this: Context & M, path: NodePath<namedTypes.TSParameterProperty>): any;
|
|
266
|
-
visitOptionalMemberExpression?(this: Context & M, path: NodePath<namedTypes.OptionalMemberExpression>): any;
|
|
267
|
-
visitOptionalCallExpression?(this: Context & M, path: NodePath<namedTypes.OptionalCallExpression>): any;
|
|
268
293
|
}
|
package/lib/equiv.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";;
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var tslib_1 = require("tslib");
|
|
4
|
-
var types_1 = tslib_1.__importDefault(require("./types"));
|
|
4
|
+
var types_1 = (0, tslib_1.__importDefault)(require("./types"));
|
|
5
5
|
function default_1(fork) {
|
|
6
6
|
var types = fork.use(types_1.default);
|
|
7
7
|
var getFieldNames = types.getFieldNames;
|
package/lib/node-path.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";;
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var tslib_1 = require("tslib");
|
|
4
|
-
var types_1 = tslib_1.__importDefault(require("./types"));
|
|
5
|
-
var path_1 = tslib_1.__importDefault(require("./path"));
|
|
6
|
-
var scope_1 = tslib_1.__importDefault(require("./scope"));
|
|
4
|
+
var types_1 = (0, tslib_1.__importDefault)(require("./types"));
|
|
5
|
+
var path_1 = (0, tslib_1.__importDefault)(require("./path"));
|
|
6
|
+
var scope_1 = (0, tslib_1.__importDefault)(require("./scope"));
|
|
7
7
|
function nodePathPlugin(fork) {
|
|
8
8
|
var types = fork.use(types_1.default);
|
|
9
9
|
var n = types.namedTypes;
|
package/lib/path-visitor.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";;
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var tslib_1 = require("tslib");
|
|
4
|
-
var types_1 = tslib_1.__importDefault(require("./types"));
|
|
5
|
-
var node_path_1 = tslib_1.__importDefault(require("./node-path"));
|
|
4
|
+
var types_1 = (0, tslib_1.__importDefault)(require("./types"));
|
|
5
|
+
var node_path_1 = (0, tslib_1.__importDefault)(require("./node-path"));
|
|
6
6
|
var hasOwn = Object.prototype.hasOwnProperty;
|
|
7
7
|
function pathVisitorPlugin(fork) {
|
|
8
8
|
var types = fork.use(types_1.default);
|
package/lib/path.d.ts
CHANGED
|
@@ -7,9 +7,9 @@ export interface Path<V = any> {
|
|
|
7
7
|
__childCache: object | null;
|
|
8
8
|
getValueProperty(name: any): any;
|
|
9
9
|
get(...names: any[]): any;
|
|
10
|
-
each(callback: any, context
|
|
11
|
-
map(callback: any, context
|
|
12
|
-
filter(callback: any, context
|
|
10
|
+
each(callback: any, context?: any): any;
|
|
11
|
+
map(callback: any, context?: any): any;
|
|
12
|
+
filter(callback: any, context?: any): any;
|
|
13
13
|
shift(): any;
|
|
14
14
|
unshift(...args: any[]): any;
|
|
15
15
|
push(...args: any[]): any;
|
package/lib/path.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";;
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var tslib_1 = require("tslib");
|
|
4
|
-
var types_1 = tslib_1.__importDefault(require("./types"));
|
|
4
|
+
var types_1 = (0, tslib_1.__importDefault)(require("./types"));
|
|
5
5
|
var Op = Object.prototype;
|
|
6
6
|
var hasOwn = Op.hasOwnProperty;
|
|
7
7
|
function pathPlugin(fork) {
|
package/lib/scope.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Fork } from "../types";
|
|
2
|
+
import { NodePath } from "./node-path";
|
|
2
3
|
export interface Scope {
|
|
3
|
-
path:
|
|
4
|
+
path: NodePath;
|
|
4
5
|
node: any;
|
|
5
6
|
isGlobal: boolean;
|
|
6
7
|
depth: number;
|
|
@@ -20,7 +21,7 @@ export interface Scope {
|
|
|
20
21
|
getGlobalScope(): Scope;
|
|
21
22
|
}
|
|
22
23
|
export interface ScopeConstructor {
|
|
23
|
-
new (path:
|
|
24
|
+
new (path: NodePath, parentScope: any): Scope;
|
|
24
25
|
isEstablishedBy(node: any): any;
|
|
25
26
|
}
|
|
26
27
|
export default function scopePlugin(fork: Fork): ScopeConstructor;
|
package/lib/scope.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";;
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var tslib_1 = require("tslib");
|
|
4
|
-
var types_1 = tslib_1.__importDefault(require("./types"));
|
|
4
|
+
var types_1 = (0, tslib_1.__importDefault)(require("./types"));
|
|
5
5
|
var hasOwn = Object.prototype.hasOwnProperty;
|
|
6
6
|
function scopePlugin(fork) {
|
|
7
7
|
var types = fork.use(types_1.default);
|
|
@@ -15,7 +15,9 @@ function scopePlugin(fork) {
|
|
|
15
15
|
if (!(this instanceof Scope)) {
|
|
16
16
|
throw new Error("Scope constructor cannot be invoked without 'new'");
|
|
17
17
|
}
|
|
18
|
-
|
|
18
|
+
if (!TypeParameterScopeType.check(path.value)) {
|
|
19
|
+
ScopeType.assert(path.value);
|
|
20
|
+
}
|
|
19
21
|
var depth;
|
|
20
22
|
if (parentScope) {
|
|
21
23
|
if (!(parentScope instanceof Scope)) {
|
|
@@ -37,19 +39,21 @@ function scopePlugin(fork) {
|
|
|
37
39
|
types: { value: {} },
|
|
38
40
|
});
|
|
39
41
|
};
|
|
40
|
-
var
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
42
|
+
var ScopeType = Type.or(
|
|
43
|
+
// Program nodes introduce global scopes.
|
|
44
|
+
namedTypes.Program,
|
|
45
|
+
// Function is the supertype of FunctionExpression,
|
|
46
|
+
// FunctionDeclaration, ArrowExpression, etc.
|
|
47
|
+
namedTypes.Function,
|
|
48
|
+
// In case you didn't know, the caught parameter shadows any variable
|
|
49
|
+
// of the same name in an outer scope.
|
|
50
|
+
namedTypes.CatchClause);
|
|
51
|
+
// These types introduce scopes that are restricted to type parameters in
|
|
52
|
+
// Flow (this doesn't apply to ECMAScript).
|
|
53
|
+
var TypeParameterScopeType = Type.or(namedTypes.Function, namedTypes.ClassDeclaration, namedTypes.ClassExpression, namedTypes.InterfaceDeclaration, namedTypes.TSInterfaceDeclaration, namedTypes.TypeAlias, namedTypes.TSTypeAliasDeclaration);
|
|
54
|
+
var FlowOrTSTypeParameterType = Type.or(namedTypes.TypeParameter, namedTypes.TSTypeParameter);
|
|
51
55
|
Scope.isEstablishedBy = function (node) {
|
|
52
|
-
return ScopeType.check(node);
|
|
56
|
+
return ScopeType.check(node) || TypeParameterScopeType.check(node);
|
|
53
57
|
};
|
|
54
58
|
var Sp = Scope.prototype;
|
|
55
59
|
// Will be overridden after an instance lazily calls scanScope.
|
|
@@ -97,6 +101,10 @@ function scopePlugin(fork) {
|
|
|
97
101
|
// Empty out this.bindings, just in cases.
|
|
98
102
|
delete this.bindings[name];
|
|
99
103
|
}
|
|
104
|
+
for (var name in this.types) {
|
|
105
|
+
// Empty out this.types, just in cases.
|
|
106
|
+
delete this.types[name];
|
|
107
|
+
}
|
|
100
108
|
scanScope(this.path, this.bindings, this.types);
|
|
101
109
|
this.didScan = true;
|
|
102
110
|
}
|
|
@@ -111,18 +119,24 @@ function scopePlugin(fork) {
|
|
|
111
119
|
};
|
|
112
120
|
function scanScope(path, bindings, scopeTypes) {
|
|
113
121
|
var node = path.value;
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
if (param.value) {
|
|
121
|
-
addPattern(param, bindings);
|
|
122
|
+
if (TypeParameterScopeType.check(node)) {
|
|
123
|
+
var params = path.get('typeParameters', 'params');
|
|
124
|
+
if (isArray.check(params.value)) {
|
|
125
|
+
params.each(function (childPath) {
|
|
126
|
+
addTypeParameter(childPath, scopeTypes);
|
|
127
|
+
});
|
|
122
128
|
}
|
|
123
129
|
}
|
|
124
|
-
|
|
125
|
-
|
|
130
|
+
if (ScopeType.check(node)) {
|
|
131
|
+
if (namedTypes.CatchClause.check(node)) {
|
|
132
|
+
// A catch clause establishes a new scope but the only variable
|
|
133
|
+
// bound in that scope is the catch parameter. Any other
|
|
134
|
+
// declarations create bindings in the outer scope.
|
|
135
|
+
addPattern(path.get("param"), bindings);
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
recursiveScanScope(path, bindings, scopeTypes);
|
|
139
|
+
}
|
|
126
140
|
}
|
|
127
141
|
}
|
|
128
142
|
function recursiveScanScope(path, bindings, scopeTypes) {
|
|
@@ -145,6 +159,7 @@ function scopePlugin(fork) {
|
|
|
145
159
|
addPattern(paramPath, bindings);
|
|
146
160
|
});
|
|
147
161
|
recursiveScanChild(path.get("body"), bindings, scopeTypes);
|
|
162
|
+
recursiveScanScope(path.get("typeParameters"), bindings, scopeTypes);
|
|
148
163
|
}
|
|
149
164
|
else if ((namedTypes.TypeAlias && namedTypes.TypeAlias.check(node)) ||
|
|
150
165
|
(namedTypes.InterfaceDeclaration && namedTypes.InterfaceDeclaration.check(node)) ||
|
|
@@ -201,8 +216,16 @@ function scopePlugin(fork) {
|
|
|
201
216
|
addPattern(path.get("id"), bindings);
|
|
202
217
|
}
|
|
203
218
|
else if (namedTypes.ClassDeclaration &&
|
|
204
|
-
namedTypes.ClassDeclaration.check(node)
|
|
219
|
+
namedTypes.ClassDeclaration.check(node) &&
|
|
220
|
+
node.id !== null) {
|
|
205
221
|
addPattern(path.get("id"), bindings);
|
|
222
|
+
recursiveScanScope(path.get("typeParameters"), bindings, scopeTypes);
|
|
223
|
+
}
|
|
224
|
+
else if ((namedTypes.InterfaceDeclaration &&
|
|
225
|
+
namedTypes.InterfaceDeclaration.check(node)) ||
|
|
226
|
+
(namedTypes.TSInterfaceDeclaration &&
|
|
227
|
+
namedTypes.TSInterfaceDeclaration.check(node))) {
|
|
228
|
+
addTypePattern(path.get("id"), scopeTypes);
|
|
206
229
|
}
|
|
207
230
|
else if (ScopeType.check(node)) {
|
|
208
231
|
if (namedTypes.CatchClause.check(node) &&
|
|
@@ -249,7 +272,9 @@ function scopePlugin(fork) {
|
|
|
249
272
|
if (namedTypes.Pattern.check(property)) {
|
|
250
273
|
addPattern(propertyPath, bindings);
|
|
251
274
|
}
|
|
252
|
-
else if (namedTypes.Property.check(property)
|
|
275
|
+
else if (namedTypes.Property.check(property) ||
|
|
276
|
+
(namedTypes.ObjectProperty &&
|
|
277
|
+
namedTypes.ObjectProperty.check(property))) {
|
|
253
278
|
addPattern(propertyPath.get('value'), bindings);
|
|
254
279
|
}
|
|
255
280
|
else if (namedTypes.SpreadProperty &&
|
|
@@ -277,6 +302,8 @@ function scopePlugin(fork) {
|
|
|
277
302
|
}
|
|
278
303
|
else if ((namedTypes.SpreadElementPattern &&
|
|
279
304
|
namedTypes.SpreadElementPattern.check(pattern)) ||
|
|
305
|
+
(namedTypes.RestElement &&
|
|
306
|
+
namedTypes.RestElement.check(pattern)) ||
|
|
280
307
|
(namedTypes.SpreadPropertyPattern &&
|
|
281
308
|
namedTypes.SpreadPropertyPattern.check(pattern))) {
|
|
282
309
|
addPattern(patternPath.get('argument'), bindings);
|
|
@@ -294,6 +321,16 @@ function scopePlugin(fork) {
|
|
|
294
321
|
}
|
|
295
322
|
}
|
|
296
323
|
}
|
|
324
|
+
function addTypeParameter(parameterPath, types) {
|
|
325
|
+
var parameter = parameterPath.value;
|
|
326
|
+
FlowOrTSTypeParameterType.assert(parameter);
|
|
327
|
+
if (hasOwn.call(types, parameter.name)) {
|
|
328
|
+
types[parameter.name].push(parameterPath);
|
|
329
|
+
}
|
|
330
|
+
else {
|
|
331
|
+
types[parameter.name] = [parameterPath];
|
|
332
|
+
}
|
|
333
|
+
}
|
|
297
334
|
Sp.lookup = function (name) {
|
|
298
335
|
for (var scope = this; scope; scope = scope.parent)
|
|
299
336
|
if (scope.declares(name))
|
package/lib/shared.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";;
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var tslib_1 = require("tslib");
|
|
4
|
-
var types_1 = tslib_1.__importDefault(require("./types"));
|
|
4
|
+
var types_1 = (0, tslib_1.__importDefault)(require("./types"));
|
|
5
5
|
function default_1(fork) {
|
|
6
6
|
var types = fork.use(types_1.default);
|
|
7
7
|
var Type = types.Type;
|
package/lib/types.js
CHANGED
|
@@ -22,7 +22,7 @@ var BaseType = /** @class */ (function () {
|
|
|
22
22
|
return BaseType;
|
|
23
23
|
}());
|
|
24
24
|
var ArrayType = /** @class */ (function (_super) {
|
|
25
|
-
tslib_1.__extends(ArrayType, _super);
|
|
25
|
+
(0, tslib_1.__extends)(ArrayType, _super);
|
|
26
26
|
function ArrayType(elemType) {
|
|
27
27
|
var _this = _super.call(this) || this;
|
|
28
28
|
_this.elemType = elemType;
|
|
@@ -39,7 +39,7 @@ var ArrayType = /** @class */ (function (_super) {
|
|
|
39
39
|
return ArrayType;
|
|
40
40
|
}(BaseType));
|
|
41
41
|
var IdentityType = /** @class */ (function (_super) {
|
|
42
|
-
tslib_1.__extends(IdentityType, _super);
|
|
42
|
+
(0, tslib_1.__extends)(IdentityType, _super);
|
|
43
43
|
function IdentityType(value) {
|
|
44
44
|
var _this = _super.call(this) || this;
|
|
45
45
|
_this.value = value;
|
|
@@ -59,7 +59,7 @@ var IdentityType = /** @class */ (function (_super) {
|
|
|
59
59
|
return IdentityType;
|
|
60
60
|
}(BaseType));
|
|
61
61
|
var ObjectType = /** @class */ (function (_super) {
|
|
62
|
-
tslib_1.__extends(ObjectType, _super);
|
|
62
|
+
(0, tslib_1.__extends)(ObjectType, _super);
|
|
63
63
|
function ObjectType(fields) {
|
|
64
64
|
var _this = _super.call(this) || this;
|
|
65
65
|
_this.fields = fields;
|
|
@@ -78,7 +78,7 @@ var ObjectType = /** @class */ (function (_super) {
|
|
|
78
78
|
return ObjectType;
|
|
79
79
|
}(BaseType));
|
|
80
80
|
var OrType = /** @class */ (function (_super) {
|
|
81
|
-
tslib_1.__extends(OrType, _super);
|
|
81
|
+
(0, tslib_1.__extends)(OrType, _super);
|
|
82
82
|
function OrType(types) {
|
|
83
83
|
var _this = _super.call(this) || this;
|
|
84
84
|
_this.types = types;
|
|
@@ -96,7 +96,7 @@ var OrType = /** @class */ (function (_super) {
|
|
|
96
96
|
return OrType;
|
|
97
97
|
}(BaseType));
|
|
98
98
|
var PredicateType = /** @class */ (function (_super) {
|
|
99
|
-
tslib_1.__extends(PredicateType, _super);
|
|
99
|
+
(0, tslib_1.__extends)(PredicateType, _super);
|
|
100
100
|
function PredicateType(name, predicate) {
|
|
101
101
|
var _this = _super.call(this) || this;
|
|
102
102
|
_this.name = name;
|
|
@@ -345,7 +345,7 @@ function typesPlugin(_fork) {
|
|
|
345
345
|
return null;
|
|
346
346
|
}
|
|
347
347
|
var DefImpl = /** @class */ (function (_super) {
|
|
348
|
-
tslib_1.__extends(DefImpl, _super);
|
|
348
|
+
(0, tslib_1.__extends)(DefImpl, _super);
|
|
349
349
|
function DefImpl(typeName) {
|
|
350
350
|
var _this = _super.call(this, new PredicateType(typeName, function (value, deep) { return _this.check(value, deep); }), typeName) || this;
|
|
351
351
|
return _this;
|
package/main.js
CHANGED
|
@@ -2,34 +2,24 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.visit = exports.use = exports.Type = exports.someField = exports.PathVisitor = exports.Path = exports.NodePath = exports.namedTypes = exports.getSupertypeNames = exports.getFieldValue = exports.getFieldNames = exports.getBuilderName = exports.finalize = exports.eachField = exports.defineMethod = exports.builtInTypes = exports.builders = exports.astNodesAreEquivalent = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
|
-
var fork_1 = tslib_1.__importDefault(require("./fork"));
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var esprima_1 = tslib_1.__importDefault(require("./def/esprima"));
|
|
13
|
-
var babel_1 = tslib_1.__importDefault(require("./def/babel"));
|
|
14
|
-
var typescript_1 = tslib_1.__importDefault(require("./def/typescript"));
|
|
15
|
-
var es_proposals_1 = tslib_1.__importDefault(require("./def/es-proposals"));
|
|
5
|
+
var fork_1 = (0, tslib_1.__importDefault)(require("./fork"));
|
|
6
|
+
var es_proposals_1 = (0, tslib_1.__importDefault)(require("./def/es-proposals"));
|
|
7
|
+
var jsx_1 = (0, tslib_1.__importDefault)(require("./def/jsx"));
|
|
8
|
+
var flow_1 = (0, tslib_1.__importDefault)(require("./def/flow"));
|
|
9
|
+
var esprima_1 = (0, tslib_1.__importDefault)(require("./def/esprima"));
|
|
10
|
+
var babel_1 = (0, tslib_1.__importDefault)(require("./def/babel"));
|
|
11
|
+
var typescript_1 = (0, tslib_1.__importDefault)(require("./def/typescript"));
|
|
16
12
|
var namedTypes_1 = require("./gen/namedTypes");
|
|
17
13
|
Object.defineProperty(exports, "namedTypes", { enumerable: true, get: function () { return namedTypes_1.namedTypes; } });
|
|
18
|
-
var _a = fork_1.default([
|
|
19
|
-
// This core module of AST types captures ES5 as it is parsed today by
|
|
20
|
-
// git://github.com/ariya/esprima.git#master.
|
|
21
|
-
core_1.default,
|
|
14
|
+
var _a = (0, fork_1.default)([
|
|
22
15
|
// Feel free to add to or remove from this list of extension modules to
|
|
23
16
|
// configure the precise type hierarchy that you need.
|
|
24
|
-
|
|
25
|
-
es7_1.default,
|
|
26
|
-
es2020_1.default,
|
|
17
|
+
es_proposals_1.default,
|
|
27
18
|
jsx_1.default,
|
|
28
19
|
flow_1.default,
|
|
29
20
|
esprima_1.default,
|
|
30
21
|
babel_1.default,
|
|
31
22
|
typescript_1.default,
|
|
32
|
-
es_proposals_1.default,
|
|
33
23
|
]), astNodesAreEquivalent = _a.astNodesAreEquivalent, builders = _a.builders, builtInTypes = _a.builtInTypes, defineMethod = _a.defineMethod, eachField = _a.eachField, finalize = _a.finalize, getBuilderName = _a.getBuilderName, getFieldNames = _a.getFieldNames, getFieldValue = _a.getFieldValue, getSupertypeNames = _a.getSupertypeNames, n = _a.namedTypes, NodePath = _a.NodePath, Path = _a.Path, PathVisitor = _a.PathVisitor, someField = _a.someField, Type = _a.Type, use = _a.use, visit = _a.visit;
|
|
34
24
|
exports.astNodesAreEquivalent = astNodesAreEquivalent;
|
|
35
25
|
exports.builders = builders;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"author": "Ben Newman <bn@cs.stanford.edu>",
|
|
3
3
|
"name": "ast-types",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.15.0",
|
|
5
5
|
"description": "Esprima-compatible implementation of the Mozilla JS Parser API",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"ast",
|
|
@@ -33,31 +33,31 @@
|
|
|
33
33
|
"test": "npm run gen && npm run build && npm run mocha",
|
|
34
34
|
"clean": "ts-emit-clean",
|
|
35
35
|
"build": "tsc && ts-add-module-exports",
|
|
36
|
-
"
|
|
36
|
+
"prepare": "npm run clean && npm run gen && npm run build",
|
|
37
37
|
"postpack": "npm run clean"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"tslib": "^2.0.1"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@babel/parser": "7.
|
|
44
|
-
"@babel/types": "7.
|
|
45
|
-
"@types/esprima": "4.0.
|
|
46
|
-
"@types/glob": "7.
|
|
47
|
-
"@types/mocha": "
|
|
48
|
-
"@types/node": "
|
|
49
|
-
"espree": "
|
|
43
|
+
"@babel/parser": "7.16.4",
|
|
44
|
+
"@babel/types": "7.16.0",
|
|
45
|
+
"@types/esprima": "4.0.3",
|
|
46
|
+
"@types/glob": "7.2.0",
|
|
47
|
+
"@types/mocha": "9.0.0",
|
|
48
|
+
"@types/node": "16.11.10",
|
|
49
|
+
"espree": "9.1.0",
|
|
50
50
|
"esprima": "4.0.1",
|
|
51
51
|
"esprima-fb": "15001.1001.0-dev-harmony-fb",
|
|
52
|
-
"flow-parser": "0.
|
|
53
|
-
"glob": "7.
|
|
54
|
-
"mocha": "
|
|
55
|
-
"recast": "0.20.
|
|
52
|
+
"flow-parser": "0.165.1",
|
|
53
|
+
"glob": "7.2.0",
|
|
54
|
+
"mocha": "^9.1.3",
|
|
55
|
+
"recast": "0.20.5",
|
|
56
56
|
"reify": "0.20.12",
|
|
57
57
|
"ts-add-module-exports": "1.0.0",
|
|
58
58
|
"ts-emit-clean": "1.0.0",
|
|
59
|
-
"ts-node": "
|
|
60
|
-
"typescript": "
|
|
59
|
+
"ts-node": "10.4.0",
|
|
60
|
+
"typescript": "4.5.2"
|
|
61
61
|
},
|
|
62
62
|
"engines": {
|
|
63
63
|
"node": ">=4"
|