ast-types 0.12.0 → 0.12.4
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/README.md +15 -7
- package/def/core.js +1 -1
- package/def/flow.js +3 -2
- package/def/typescript.js +25 -14
- package/gen/builders.d.ts +46 -64
- package/gen/kinds.d.ts +9 -29
- package/gen/namedTypes.d.ts +3 -23
- package/gen/nodes.d.ts +27 -96
- package/gen/visitor.d.ts +3 -23
- package/lib/path.js +1 -1
- package/lib/scope.js +4 -1
- package/main.js +0 -4
- package/package.json +20 -21
- package/def/e4x.d.ts +0 -2
- package/def/e4x.js +0 -75
- package/def/mozilla.d.ts +0 -2
- package/def/mozilla.js +0 -46
- package/lib/type-annotations.d.ts +0 -11
- package/lib/type-annotations.js +0 -90
- package/lib/utils.d.ts +0 -2
- package/lib/utils.js +0 -18
package/README.md
CHANGED
|
@@ -421,7 +421,7 @@ Scope
|
|
|
421
421
|
|
|
422
422
|
The object exposed as `path.scope` during AST traversals provides
|
|
423
423
|
information about variable and function declarations in the scope that
|
|
424
|
-
contains `path.node`. See [scope.
|
|
424
|
+
contains `path.node`. See [scope.ts](lib/scope.ts) for its public
|
|
425
425
|
interface, which currently includes `.isGlobal`, `.getGlobalScope()`,
|
|
426
426
|
`.depth`, `.declares(name)`, `.lookup(name)`, and `.getBindings()`.
|
|
427
427
|
|
|
@@ -476,11 +476,19 @@ b.file(b.blockStatement([]));
|
|
|
476
476
|
b.file("lib/types.js", b.thisExpression());
|
|
477
477
|
// ==> AssertionError: {"type":"ThisExpression","loc":null} does not match type Program
|
|
478
478
|
```
|
|
479
|
+
|
|
479
480
|
The `def` syntax is used to define all the default AST node types found in
|
|
480
|
-
[core.
|
|
481
|
-
[
|
|
482
|
-
[
|
|
483
|
-
[
|
|
484
|
-
[
|
|
485
|
-
[
|
|
481
|
+
[babel-core.ts](def/babel-core.ts),
|
|
482
|
+
[babel.ts](def/babel.ts),
|
|
483
|
+
[core.ts](def/core.ts),
|
|
484
|
+
[es-proposals.ts](def/es-proposals.ts),
|
|
485
|
+
[es6.ts](def/es6.ts),
|
|
486
|
+
[es7.ts](def/es7.ts),
|
|
487
|
+
[esprima.ts](def/esprima.ts),
|
|
488
|
+
[flow.ts](def/flow.ts),
|
|
489
|
+
[jsx.ts](def/jsx.ts),
|
|
490
|
+
[type-annotations.ts](def/type-annotations.ts),
|
|
491
|
+
and
|
|
492
|
+
[typescripts.ts](def/typescripts.ts),
|
|
493
|
+
so you have
|
|
486
494
|
no shortage of examples to learn from.
|
package/def/core.js
CHANGED
|
@@ -189,7 +189,7 @@ function default_1(fork) {
|
|
|
189
189
|
// always true for unary operators.
|
|
190
190
|
.field("prefix", Boolean, defaults["true"]);
|
|
191
191
|
var BinaryOperator = or("==", "!=", "===", "!==", "<", "<=", ">", ">=", "<<", ">>", ">>>", "+", "-", "*", "/", "%", "**", "&", // TODO Missing from the Parser API.
|
|
192
|
-
"|", "^", "in", "instanceof"
|
|
192
|
+
"|", "^", "in", "instanceof");
|
|
193
193
|
def("BinaryExpression")
|
|
194
194
|
.bases("Expression")
|
|
195
195
|
.build("operator", "left", "right")
|
package/def/flow.js
CHANGED
|
@@ -109,6 +109,7 @@ function default_1(fork) {
|
|
|
109
109
|
])
|
|
110
110
|
.field("indexers", [def("ObjectTypeIndexer")], defaults.emptyArray)
|
|
111
111
|
.field("callProperties", [def("ObjectTypeCallProperty")], defaults.emptyArray)
|
|
112
|
+
.field("inexact", or(Boolean, void 0), defaults["undefined"])
|
|
112
113
|
.field("exact", Boolean, defaults["false"])
|
|
113
114
|
.field("internalSlots", [def("ObjectTypeInternalSlot")], defaults.emptyArray);
|
|
114
115
|
def("Variance")
|
|
@@ -227,8 +228,8 @@ function default_1(fork) {
|
|
|
227
228
|
.build("id", "typeParameters", "impltype", "supertype")
|
|
228
229
|
.field("id", def("Identifier"))
|
|
229
230
|
.field("typeParameters", or(def("TypeParameterDeclaration"), null))
|
|
230
|
-
.field("
|
|
231
|
-
.field("
|
|
231
|
+
.field("impltype", def("FlowType"))
|
|
232
|
+
.field("supertype", def("FlowType"));
|
|
232
233
|
def("DeclareTypeAlias")
|
|
233
234
|
.bases("TypeAlias")
|
|
234
235
|
.build("id", "typeParameters", "right");
|
package/def/typescript.js
CHANGED
|
@@ -31,11 +31,14 @@ function default_1(fork) {
|
|
|
31
31
|
}, "StringLiteral");
|
|
32
32
|
def("TSType")
|
|
33
33
|
.bases("Node");
|
|
34
|
-
var
|
|
34
|
+
var TSEntityName = or(def("Identifier"), def("TSQualifiedName"));
|
|
35
35
|
def("TSTypeReference")
|
|
36
|
-
.bases("TSType")
|
|
36
|
+
.bases("TSType", "TSHasOptionalTypeParameterInstantiation")
|
|
37
37
|
.build("typeName", "typeParameters")
|
|
38
|
-
.field("typeName",
|
|
38
|
+
.field("typeName", TSEntityName);
|
|
39
|
+
// An abstract (non-buildable) base type that provide a commonly-needed
|
|
40
|
+
// optional .typeParameters field.
|
|
41
|
+
def("TSHasOptionalTypeParameterInstantiation")
|
|
39
42
|
.field("typeParameters", or(def("TSTypeParameterInstantiation"), null), defaults["null"]);
|
|
40
43
|
// An abstract (non-buildable) base type that provide a commonly-needed
|
|
41
44
|
// optional .typeParameters field.
|
|
@@ -48,8 +51,8 @@ function default_1(fork) {
|
|
|
48
51
|
def("TSQualifiedName")
|
|
49
52
|
.bases("Node")
|
|
50
53
|
.build("left", "right")
|
|
51
|
-
.field("left",
|
|
52
|
-
.field("right",
|
|
54
|
+
.field("left", TSEntityName)
|
|
55
|
+
.field("right", TSEntityName);
|
|
53
56
|
def("TSAsExpression")
|
|
54
57
|
.bases("Expression")
|
|
55
58
|
.build("expression")
|
|
@@ -62,6 +65,7 @@ function default_1(fork) {
|
|
|
62
65
|
.field("expression", def("Expression"));
|
|
63
66
|
[
|
|
64
67
|
"TSAnyKeyword",
|
|
68
|
+
"TSBigIntKeyword",
|
|
65
69
|
"TSBooleanKeyword",
|
|
66
70
|
"TSNeverKeyword",
|
|
67
71
|
"TSNullKeyword",
|
|
@@ -85,7 +89,7 @@ function default_1(fork) {
|
|
|
85
89
|
def("TSLiteralType")
|
|
86
90
|
.bases("TSType")
|
|
87
91
|
.build("literal")
|
|
88
|
-
.field("literal", or(def("NumericLiteral"), def("StringLiteral"), def("BooleanLiteral")));
|
|
92
|
+
.field("literal", or(def("NumericLiteral"), def("StringLiteral"), def("BooleanLiteral"), def("TemplateLiteral"), def("UnaryExpression")));
|
|
89
93
|
["TSUnionType",
|
|
90
94
|
"TSIntersectionType",
|
|
91
95
|
].forEach(function (typeName) {
|
|
@@ -109,7 +113,7 @@ function default_1(fork) {
|
|
|
109
113
|
.bases("TSType")
|
|
110
114
|
.build("typeAnnotation")
|
|
111
115
|
.field("typeAnnotation", def("TSType"));
|
|
112
|
-
var ParametersType = [or(def("Identifier"), def("RestElement"), def("ObjectPattern"))];
|
|
116
|
+
var ParametersType = [or(def("Identifier"), def("RestElement"), def("ArrayPattern"), def("ObjectPattern"))];
|
|
113
117
|
["TSFunctionType",
|
|
114
118
|
"TSConstructorType",
|
|
115
119
|
].forEach(function (typeName) {
|
|
@@ -226,7 +230,7 @@ function default_1(fork) {
|
|
|
226
230
|
def("TSTypeQuery")
|
|
227
231
|
.bases("TSType")
|
|
228
232
|
.build("exprName")
|
|
229
|
-
.field("exprName",
|
|
233
|
+
.field("exprName", or(TSEntityName, def("TSImportType")));
|
|
230
234
|
// Inferred from Babylon's tsParseTypeMember method.
|
|
231
235
|
var TSTypeMember = or(def("TSCallSignatureDeclaration"), def("TSConstructSignatureDeclaration"), def("TSIndexSignature"), def("TSMethodSignature"), def("TSPropertySignature"));
|
|
232
236
|
def("TSTypeLiteral")
|
|
@@ -274,16 +278,21 @@ function default_1(fork) {
|
|
|
274
278
|
def("TSModuleDeclaration")
|
|
275
279
|
.bases("Declaration")
|
|
276
280
|
.build("id", "body")
|
|
277
|
-
.field("id", or(StringLiteral,
|
|
281
|
+
.field("id", or(StringLiteral, TSEntityName))
|
|
278
282
|
.field("declare", Boolean, defaults["false"])
|
|
279
283
|
.field("global", Boolean, defaults["false"])
|
|
280
284
|
.field("body", or(def("TSModuleBlock"), def("TSModuleDeclaration"), null), defaults["null"]);
|
|
285
|
+
def("TSImportType")
|
|
286
|
+
.bases("TSType", "TSHasOptionalTypeParameterInstantiation")
|
|
287
|
+
.build("argument", "qualifier", "typeParameters")
|
|
288
|
+
.field("argument", StringLiteral)
|
|
289
|
+
.field("qualifier", or(TSEntityName, void 0), defaults["undefined"]);
|
|
281
290
|
def("TSImportEqualsDeclaration")
|
|
282
291
|
.bases("Declaration")
|
|
283
292
|
.build("id", "moduleReference")
|
|
284
293
|
.field("id", def("Identifier"))
|
|
285
294
|
.field("isExport", Boolean, defaults["false"])
|
|
286
|
-
.field("moduleReference", or(
|
|
295
|
+
.field("moduleReference", or(TSEntityName, def("TSExternalModuleReference")));
|
|
287
296
|
def("TSExternalModuleReference")
|
|
288
297
|
.bases("Declaration")
|
|
289
298
|
.build("expression")
|
|
@@ -301,14 +310,13 @@ function default_1(fork) {
|
|
|
301
310
|
.build("body")
|
|
302
311
|
.field("body", [TSTypeMember]);
|
|
303
312
|
def("TSExpressionWithTypeArguments")
|
|
304
|
-
.bases("TSType")
|
|
313
|
+
.bases("TSType", "TSHasOptionalTypeParameterInstantiation")
|
|
305
314
|
.build("expression", "typeParameters")
|
|
306
|
-
.field("expression",
|
|
307
|
-
.field("typeParameters", or(def("TSTypeParameterInstantiation"), null), defaults["null"]);
|
|
315
|
+
.field("expression", TSEntityName);
|
|
308
316
|
def("TSInterfaceDeclaration")
|
|
309
317
|
.bases("Declaration", "TSHasOptionalTypeParameters")
|
|
310
318
|
.build("id", "body")
|
|
311
|
-
.field("id",
|
|
319
|
+
.field("id", TSEntityName)
|
|
312
320
|
.field("declare", Boolean, defaults["false"])
|
|
313
321
|
.field("extends", or([def("TSExpressionWithTypeArguments")], null), defaults["null"])
|
|
314
322
|
.field("body", def("TSInterfaceBody"));
|
|
@@ -318,6 +326,9 @@ function default_1(fork) {
|
|
|
318
326
|
.field("accessibility", or("public", "private", "protected", void 0), defaults["undefined"])
|
|
319
327
|
.field("readonly", Boolean, defaults["false"])
|
|
320
328
|
.field("parameter", or(def("Identifier"), def("AssignmentPattern")));
|
|
329
|
+
def("ClassProperty")
|
|
330
|
+
.field("access", // Not "accessibility"?
|
|
331
|
+
or("public", "private", "protected", void 0), defaults["undefined"]);
|
|
321
332
|
// Defined already in es6 and babel-core.
|
|
322
333
|
def("ClassBody")
|
|
323
334
|
.field("body", [or(def("MethodDefinition"), def("VariableDeclarator"), def("ClassPropertyDefinition"), def("ClassProperty"), def("ClassPrivateProperty"), def("ClassMethod"), def("ClassPrivateMethod"),
|
package/gen/builders.d.ts
CHANGED
|
@@ -193,11 +193,10 @@ export interface VariableDeclarationBuilder {
|
|
|
193
193
|
}): N.VariableDeclaration;
|
|
194
194
|
}
|
|
195
195
|
export interface ForInStatementBuilder {
|
|
196
|
-
(left: K.VariableDeclarationKind | K.ExpressionKind, right: K.ExpressionKind, body: K.StatementKind
|
|
196
|
+
(left: K.VariableDeclarationKind | K.ExpressionKind, right: K.ExpressionKind, body: K.StatementKind): N.ForInStatement;
|
|
197
197
|
from(params: {
|
|
198
198
|
body: K.StatementKind;
|
|
199
199
|
comments?: K.CommentKind[] | null;
|
|
200
|
-
each?: boolean;
|
|
201
200
|
left: K.VariableDeclarationKind | K.ExpressionKind;
|
|
202
201
|
loc?: K.SourceLocationKind | null;
|
|
203
202
|
right: K.ExpressionKind;
|
|
@@ -211,10 +210,10 @@ export interface DebuggerStatementBuilder {
|
|
|
211
210
|
}): N.DebuggerStatement;
|
|
212
211
|
}
|
|
213
212
|
export interface FunctionDeclarationBuilder {
|
|
214
|
-
(id: K.IdentifierKind, params: K.PatternKind[], body: K.BlockStatementKind
|
|
213
|
+
(id: K.IdentifierKind, params: K.PatternKind[], body: K.BlockStatementKind, generator?: boolean, expression?: boolean): N.FunctionDeclaration;
|
|
215
214
|
from(params: {
|
|
216
215
|
async?: boolean;
|
|
217
|
-
body: K.BlockStatementKind
|
|
216
|
+
body: K.BlockStatementKind;
|
|
218
217
|
comments?: K.CommentKind[] | null;
|
|
219
218
|
defaults?: (K.ExpressionKind | null)[];
|
|
220
219
|
expression?: boolean;
|
|
@@ -228,10 +227,10 @@ export interface FunctionDeclarationBuilder {
|
|
|
228
227
|
}): N.FunctionDeclaration;
|
|
229
228
|
}
|
|
230
229
|
export interface FunctionExpressionBuilder {
|
|
231
|
-
(id: K.IdentifierKind | null | undefined, params: K.PatternKind[], body: K.BlockStatementKind
|
|
230
|
+
(id: K.IdentifierKind | null | undefined, params: K.PatternKind[], body: K.BlockStatementKind, generator?: boolean, expression?: boolean): N.FunctionExpression;
|
|
232
231
|
from(params: {
|
|
233
232
|
async?: boolean;
|
|
234
|
-
body: K.BlockStatementKind
|
|
233
|
+
body: K.BlockStatementKind;
|
|
235
234
|
comments?: K.CommentKind[] | null;
|
|
236
235
|
defaults?: (K.ExpressionKind | null)[];
|
|
237
236
|
expression?: boolean;
|
|
@@ -321,12 +320,12 @@ export interface UnaryExpressionBuilder {
|
|
|
321
320
|
}): N.UnaryExpression;
|
|
322
321
|
}
|
|
323
322
|
export interface BinaryExpressionBuilder {
|
|
324
|
-
(operator: "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "<<" | ">>" | ">>>" | "+" | "-" | "*" | "/" | "%" | "**" | "&" | "|" | "^" | "in" | "instanceof"
|
|
323
|
+
(operator: "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "<<" | ">>" | ">>>" | "+" | "-" | "*" | "/" | "%" | "**" | "&" | "|" | "^" | "in" | "instanceof", left: K.ExpressionKind, right: K.ExpressionKind): N.BinaryExpression;
|
|
325
324
|
from(params: {
|
|
326
325
|
comments?: K.CommentKind[] | null;
|
|
327
326
|
left: K.ExpressionKind;
|
|
328
327
|
loc?: K.SourceLocationKind | null;
|
|
329
|
-
operator: "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "<<" | ">>" | ">>>" | "+" | "-" | "*" | "/" | "%" | "**" | "&" | "|" | "^" | "in" | "instanceof"
|
|
328
|
+
operator: "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "<<" | ">>" | ">>>" | "+" | "-" | "*" | "/" | "%" | "**" | "&" | "|" | "^" | "in" | "instanceof";
|
|
330
329
|
right: K.ExpressionKind;
|
|
331
330
|
}): N.BinaryExpression;
|
|
332
331
|
}
|
|
@@ -578,6 +577,7 @@ export interface ClassPropertyDefinitionBuilder {
|
|
|
578
577
|
export interface ClassPropertyBuilder {
|
|
579
578
|
(key: K.LiteralKind | K.IdentifierKind | K.ExpressionKind, value: K.ExpressionKind | null, typeAnnotation?: K.TypeAnnotationKind | K.TSTypeAnnotationKind | null, staticParam?: boolean): N.ClassProperty;
|
|
580
579
|
from(params: {
|
|
580
|
+
access?: "public" | "private" | "protected" | undefined;
|
|
581
581
|
comments?: K.CommentKind[] | null;
|
|
582
582
|
computed?: boolean;
|
|
583
583
|
key: K.LiteralKind | K.IdentifierKind | K.ExpressionKind;
|
|
@@ -721,41 +721,6 @@ export interface AwaitExpressionBuilder {
|
|
|
721
721
|
loc?: K.SourceLocationKind | null;
|
|
722
722
|
}): N.AwaitExpression;
|
|
723
723
|
}
|
|
724
|
-
export interface LetStatementBuilder {
|
|
725
|
-
(head: K.VariableDeclaratorKind[], body: K.StatementKind): N.LetStatement;
|
|
726
|
-
from(params: {
|
|
727
|
-
body: K.StatementKind;
|
|
728
|
-
comments?: K.CommentKind[] | null;
|
|
729
|
-
head: K.VariableDeclaratorKind[];
|
|
730
|
-
loc?: K.SourceLocationKind | null;
|
|
731
|
-
}): N.LetStatement;
|
|
732
|
-
}
|
|
733
|
-
export interface LetExpressionBuilder {
|
|
734
|
-
(head: K.VariableDeclaratorKind[], body: K.ExpressionKind): N.LetExpression;
|
|
735
|
-
from(params: {
|
|
736
|
-
body: K.ExpressionKind;
|
|
737
|
-
comments?: K.CommentKind[] | null;
|
|
738
|
-
head: K.VariableDeclaratorKind[];
|
|
739
|
-
loc?: K.SourceLocationKind | null;
|
|
740
|
-
}): N.LetExpression;
|
|
741
|
-
}
|
|
742
|
-
export interface GraphExpressionBuilder {
|
|
743
|
-
(index: number, expression: K.LiteralKind): N.GraphExpression;
|
|
744
|
-
from(params: {
|
|
745
|
-
comments?: K.CommentKind[] | null;
|
|
746
|
-
expression: K.LiteralKind;
|
|
747
|
-
index: number;
|
|
748
|
-
loc?: K.SourceLocationKind | null;
|
|
749
|
-
}): N.GraphExpression;
|
|
750
|
-
}
|
|
751
|
-
export interface GraphIndexExpressionBuilder {
|
|
752
|
-
(index: number): N.GraphIndexExpression;
|
|
753
|
-
from(params: {
|
|
754
|
-
comments?: K.CommentKind[] | null;
|
|
755
|
-
index: number;
|
|
756
|
-
loc?: K.SourceLocationKind | null;
|
|
757
|
-
}): N.GraphIndexExpression;
|
|
758
|
-
}
|
|
759
724
|
export interface JSXAttributeBuilder {
|
|
760
725
|
(name: K.JSXIdentifierKind | K.JSXNamespacedNameKind, value?: K.LiteralKind | K.JSXExpressionContainerKind | null): N.JSXAttribute;
|
|
761
726
|
from(params: {
|
|
@@ -1107,6 +1072,7 @@ export interface ObjectTypeAnnotationBuilder {
|
|
|
1107
1072
|
comments?: K.CommentKind[] | null;
|
|
1108
1073
|
exact?: boolean;
|
|
1109
1074
|
indexers?: K.ObjectTypeIndexerKind[];
|
|
1075
|
+
inexact?: boolean | undefined;
|
|
1110
1076
|
internalSlots?: K.ObjectTypeInternalSlotKind[];
|
|
1111
1077
|
loc?: K.SourceLocationKind | null;
|
|
1112
1078
|
properties: (K.ObjectTypePropertyKind | K.ObjectTypeSpreadPropertyKind)[];
|
|
@@ -1283,13 +1249,13 @@ export interface TypeAliasBuilder {
|
|
|
1283
1249
|
}): N.TypeAlias;
|
|
1284
1250
|
}
|
|
1285
1251
|
export interface OpaqueTypeBuilder {
|
|
1286
|
-
(id: K.IdentifierKind, typeParameters: K.TypeParameterDeclarationKind | null): N.OpaqueType;
|
|
1252
|
+
(id: K.IdentifierKind, typeParameters: K.TypeParameterDeclarationKind | null, impltype: K.FlowTypeKind, supertype: K.FlowTypeKind): N.OpaqueType;
|
|
1287
1253
|
from(params: {
|
|
1288
1254
|
comments?: K.CommentKind[] | null;
|
|
1289
1255
|
id: K.IdentifierKind;
|
|
1290
|
-
|
|
1256
|
+
impltype: K.FlowTypeKind;
|
|
1291
1257
|
loc?: K.SourceLocationKind | null;
|
|
1292
|
-
|
|
1258
|
+
supertype: K.FlowTypeKind;
|
|
1293
1259
|
typeParameters: K.TypeParameterDeclarationKind | null;
|
|
1294
1260
|
}): N.OpaqueType;
|
|
1295
1261
|
}
|
|
@@ -1704,6 +1670,7 @@ export interface ObjectMethodBuilder {
|
|
|
1704
1670
|
export interface ClassPrivatePropertyBuilder {
|
|
1705
1671
|
(key: K.PrivateNameKind, value?: K.ExpressionKind | null): N.ClassPrivateProperty;
|
|
1706
1672
|
from(params: {
|
|
1673
|
+
access?: "public" | "private" | "protected" | undefined;
|
|
1707
1674
|
comments?: K.CommentKind[] | null;
|
|
1708
1675
|
computed?: boolean;
|
|
1709
1676
|
key: K.PrivateNameKind;
|
|
@@ -1844,6 +1811,13 @@ export interface TSAnyKeywordBuilder {
|
|
|
1844
1811
|
loc?: K.SourceLocationKind | null;
|
|
1845
1812
|
}): N.TSAnyKeyword;
|
|
1846
1813
|
}
|
|
1814
|
+
export interface TSBigIntKeywordBuilder {
|
|
1815
|
+
(): N.TSBigIntKeyword;
|
|
1816
|
+
from(params: {
|
|
1817
|
+
comments?: K.CommentKind[] | null;
|
|
1818
|
+
loc?: K.SourceLocationKind | null;
|
|
1819
|
+
}): N.TSBigIntKeyword;
|
|
1820
|
+
}
|
|
1847
1821
|
export interface TSBooleanKeywordBuilder {
|
|
1848
1822
|
(): N.TSBooleanKeyword;
|
|
1849
1823
|
from(params: {
|
|
@@ -1930,10 +1904,10 @@ export interface TSArrayTypeBuilder {
|
|
|
1930
1904
|
}): N.TSArrayType;
|
|
1931
1905
|
}
|
|
1932
1906
|
export interface TSLiteralTypeBuilder {
|
|
1933
|
-
(literal: K.NumericLiteralKind | K.StringLiteralKind | K.BooleanLiteralKind): N.TSLiteralType;
|
|
1907
|
+
(literal: K.NumericLiteralKind | K.StringLiteralKind | K.BooleanLiteralKind | K.TemplateLiteralKind | K.UnaryExpressionKind): N.TSLiteralType;
|
|
1934
1908
|
from(params: {
|
|
1935
1909
|
comments?: K.CommentKind[] | null;
|
|
1936
|
-
literal: K.NumericLiteralKind | K.StringLiteralKind | K.BooleanLiteralKind;
|
|
1910
|
+
literal: K.NumericLiteralKind | K.StringLiteralKind | K.BooleanLiteralKind | K.TemplateLiteralKind | K.UnaryExpressionKind;
|
|
1937
1911
|
loc?: K.SourceLocationKind | null;
|
|
1938
1912
|
}): N.TSLiteralType;
|
|
1939
1913
|
}
|
|
@@ -1993,21 +1967,21 @@ export interface TSParenthesizedTypeBuilder {
|
|
|
1993
1967
|
}): N.TSParenthesizedType;
|
|
1994
1968
|
}
|
|
1995
1969
|
export interface TSFunctionTypeBuilder {
|
|
1996
|
-
(parameters: (K.IdentifierKind | K.RestElementKind | K.ObjectPatternKind)[]): N.TSFunctionType;
|
|
1970
|
+
(parameters: (K.IdentifierKind | K.RestElementKind | K.ArrayPatternKind | K.ObjectPatternKind)[]): N.TSFunctionType;
|
|
1997
1971
|
from(params: {
|
|
1998
1972
|
comments?: K.CommentKind[] | null;
|
|
1999
1973
|
loc?: K.SourceLocationKind | null;
|
|
2000
|
-
parameters: (K.IdentifierKind | K.RestElementKind | K.ObjectPatternKind)[];
|
|
1974
|
+
parameters: (K.IdentifierKind | K.RestElementKind | K.ArrayPatternKind | K.ObjectPatternKind)[];
|
|
2001
1975
|
typeAnnotation?: K.TSTypeAnnotationKind | null;
|
|
2002
1976
|
typeParameters?: K.TSTypeParameterDeclarationKind | null | undefined;
|
|
2003
1977
|
}): N.TSFunctionType;
|
|
2004
1978
|
}
|
|
2005
1979
|
export interface TSConstructorTypeBuilder {
|
|
2006
|
-
(parameters: (K.IdentifierKind | K.RestElementKind | K.ObjectPatternKind)[]): N.TSConstructorType;
|
|
1980
|
+
(parameters: (K.IdentifierKind | K.RestElementKind | K.ArrayPatternKind | K.ObjectPatternKind)[]): N.TSConstructorType;
|
|
2007
1981
|
from(params: {
|
|
2008
1982
|
comments?: K.CommentKind[] | null;
|
|
2009
1983
|
loc?: K.SourceLocationKind | null;
|
|
2010
|
-
parameters: (K.IdentifierKind | K.RestElementKind | K.ObjectPatternKind)[];
|
|
1984
|
+
parameters: (K.IdentifierKind | K.RestElementKind | K.ArrayPatternKind | K.ObjectPatternKind)[];
|
|
2011
1985
|
typeAnnotation?: K.TSTypeAnnotationKind | null;
|
|
2012
1986
|
typeParameters?: K.TSTypeParameterDeclarationKind | null | undefined;
|
|
2013
1987
|
}): N.TSConstructorType;
|
|
@@ -2124,14 +2098,14 @@ export interface TSPropertySignatureBuilder {
|
|
|
2124
2098
|
}): N.TSPropertySignature;
|
|
2125
2099
|
}
|
|
2126
2100
|
export interface TSMethodSignatureBuilder {
|
|
2127
|
-
(key: K.ExpressionKind, parameters: (K.IdentifierKind | K.RestElementKind | K.ObjectPatternKind)[], typeAnnotation?: K.TSTypeAnnotationKind | null): N.TSMethodSignature;
|
|
2101
|
+
(key: K.ExpressionKind, parameters: (K.IdentifierKind | K.RestElementKind | K.ArrayPatternKind | K.ObjectPatternKind)[], typeAnnotation?: K.TSTypeAnnotationKind | null): N.TSMethodSignature;
|
|
2128
2102
|
from(params: {
|
|
2129
2103
|
comments?: K.CommentKind[] | null;
|
|
2130
2104
|
computed?: boolean;
|
|
2131
2105
|
key: K.ExpressionKind;
|
|
2132
2106
|
loc?: K.SourceLocationKind | null;
|
|
2133
2107
|
optional?: boolean;
|
|
2134
|
-
parameters: (K.IdentifierKind | K.RestElementKind | K.ObjectPatternKind)[];
|
|
2108
|
+
parameters: (K.IdentifierKind | K.RestElementKind | K.ArrayPatternKind | K.ObjectPatternKind)[];
|
|
2135
2109
|
typeAnnotation?: K.TSTypeAnnotationKind | null;
|
|
2136
2110
|
typeParameters?: K.TSTypeParameterDeclarationKind | null | undefined;
|
|
2137
2111
|
}): N.TSMethodSignature;
|
|
@@ -2146,21 +2120,21 @@ export interface TSTypePredicateBuilder {
|
|
|
2146
2120
|
}): N.TSTypePredicate;
|
|
2147
2121
|
}
|
|
2148
2122
|
export interface TSCallSignatureDeclarationBuilder {
|
|
2149
|
-
(parameters: (K.IdentifierKind | K.RestElementKind | K.ObjectPatternKind)[], typeAnnotation?: K.TSTypeAnnotationKind | null): N.TSCallSignatureDeclaration;
|
|
2123
|
+
(parameters: (K.IdentifierKind | K.RestElementKind | K.ArrayPatternKind | K.ObjectPatternKind)[], typeAnnotation?: K.TSTypeAnnotationKind | null): N.TSCallSignatureDeclaration;
|
|
2150
2124
|
from(params: {
|
|
2151
2125
|
comments?: K.CommentKind[] | null;
|
|
2152
2126
|
loc?: K.SourceLocationKind | null;
|
|
2153
|
-
parameters: (K.IdentifierKind | K.RestElementKind | K.ObjectPatternKind)[];
|
|
2127
|
+
parameters: (K.IdentifierKind | K.RestElementKind | K.ArrayPatternKind | K.ObjectPatternKind)[];
|
|
2154
2128
|
typeAnnotation?: K.TSTypeAnnotationKind | null;
|
|
2155
2129
|
typeParameters?: K.TSTypeParameterDeclarationKind | null | undefined;
|
|
2156
2130
|
}): N.TSCallSignatureDeclaration;
|
|
2157
2131
|
}
|
|
2158
2132
|
export interface TSConstructSignatureDeclarationBuilder {
|
|
2159
|
-
(parameters: (K.IdentifierKind | K.RestElementKind | K.ObjectPatternKind)[], typeAnnotation?: K.TSTypeAnnotationKind | null): N.TSConstructSignatureDeclaration;
|
|
2133
|
+
(parameters: (K.IdentifierKind | K.RestElementKind | K.ArrayPatternKind | K.ObjectPatternKind)[], typeAnnotation?: K.TSTypeAnnotationKind | null): N.TSConstructSignatureDeclaration;
|
|
2160
2134
|
from(params: {
|
|
2161
2135
|
comments?: K.CommentKind[] | null;
|
|
2162
2136
|
loc?: K.SourceLocationKind | null;
|
|
2163
|
-
parameters: (K.IdentifierKind | K.RestElementKind | K.ObjectPatternKind)[];
|
|
2137
|
+
parameters: (K.IdentifierKind | K.RestElementKind | K.ArrayPatternKind | K.ObjectPatternKind)[];
|
|
2164
2138
|
typeAnnotation?: K.TSTypeAnnotationKind | null;
|
|
2165
2139
|
typeParameters?: K.TSTypeParameterDeclarationKind | null | undefined;
|
|
2166
2140
|
}): N.TSConstructSignatureDeclaration;
|
|
@@ -2175,13 +2149,23 @@ export interface TSEnumMemberBuilder {
|
|
|
2175
2149
|
}): N.TSEnumMember;
|
|
2176
2150
|
}
|
|
2177
2151
|
export interface TSTypeQueryBuilder {
|
|
2178
|
-
(exprName: K.IdentifierKind | K.TSQualifiedNameKind): N.TSTypeQuery;
|
|
2152
|
+
(exprName: K.IdentifierKind | K.TSQualifiedNameKind | K.TSImportTypeKind): N.TSTypeQuery;
|
|
2179
2153
|
from(params: {
|
|
2180
2154
|
comments?: K.CommentKind[] | null;
|
|
2181
|
-
exprName: K.IdentifierKind | K.TSQualifiedNameKind;
|
|
2155
|
+
exprName: K.IdentifierKind | K.TSQualifiedNameKind | K.TSImportTypeKind;
|
|
2182
2156
|
loc?: K.SourceLocationKind | null;
|
|
2183
2157
|
}): N.TSTypeQuery;
|
|
2184
2158
|
}
|
|
2159
|
+
export interface TSImportTypeBuilder {
|
|
2160
|
+
(argument: K.StringLiteralKind, qualifier?: K.IdentifierKind | K.TSQualifiedNameKind | undefined, typeParameters?: K.TSTypeParameterInstantiationKind | null): N.TSImportType;
|
|
2161
|
+
from(params: {
|
|
2162
|
+
argument: K.StringLiteralKind;
|
|
2163
|
+
comments?: K.CommentKind[] | null;
|
|
2164
|
+
loc?: K.SourceLocationKind | null;
|
|
2165
|
+
qualifier?: K.IdentifierKind | K.TSQualifiedNameKind | undefined;
|
|
2166
|
+
typeParameters?: K.TSTypeParameterInstantiationKind | null;
|
|
2167
|
+
}): N.TSImportType;
|
|
2168
|
+
}
|
|
2185
2169
|
export interface TSTypeLiteralBuilder {
|
|
2186
2170
|
(members: (K.TSCallSignatureDeclarationKind | K.TSConstructSignatureDeclarationKind | K.TSIndexSignatureKind | K.TSMethodSignatureKind | K.TSPropertySignatureKind)[]): N.TSTypeLiteral;
|
|
2187
2171
|
from(params: {
|
|
@@ -2403,10 +2387,6 @@ export interface Builders {
|
|
|
2403
2387
|
spreadProperty: SpreadPropertyBuilder;
|
|
2404
2388
|
spreadPropertyPattern: SpreadPropertyPatternBuilder;
|
|
2405
2389
|
awaitExpression: AwaitExpressionBuilder;
|
|
2406
|
-
letStatement: LetStatementBuilder;
|
|
2407
|
-
letExpression: LetExpressionBuilder;
|
|
2408
|
-
graphExpression: GraphExpressionBuilder;
|
|
2409
|
-
graphIndexExpression: GraphIndexExpressionBuilder;
|
|
2410
2390
|
jsxAttribute: JSXAttributeBuilder;
|
|
2411
2391
|
jsxIdentifier: JSXIdentifierBuilder;
|
|
2412
2392
|
jsxNamespacedName: JSXNamespacedNameBuilder;
|
|
@@ -2522,6 +2502,7 @@ export interface Builders {
|
|
|
2522
2502
|
tsAsExpression: TSAsExpressionBuilder;
|
|
2523
2503
|
tsNonNullExpression: TSNonNullExpressionBuilder;
|
|
2524
2504
|
tsAnyKeyword: TSAnyKeywordBuilder;
|
|
2505
|
+
tsBigIntKeyword: TSBigIntKeywordBuilder;
|
|
2525
2506
|
tsBooleanKeyword: TSBooleanKeywordBuilder;
|
|
2526
2507
|
tsNeverKeyword: TSNeverKeywordBuilder;
|
|
2527
2508
|
tsNullKeyword: TSNullKeywordBuilder;
|
|
@@ -2559,6 +2540,7 @@ export interface Builders {
|
|
|
2559
2540
|
tsConstructSignatureDeclaration: TSConstructSignatureDeclarationBuilder;
|
|
2560
2541
|
tsEnumMember: TSEnumMemberBuilder;
|
|
2561
2542
|
tsTypeQuery: TSTypeQueryBuilder;
|
|
2543
|
+
tsImportType: TSImportTypeBuilder;
|
|
2562
2544
|
tsTypeLiteral: TSTypeLiteralBuilder;
|
|
2563
2545
|
tsTypeAssertion: TSTypeAssertionBuilder;
|
|
2564
2546
|
tsEnumDeclaration: TSEnumDeclarationBuilder;
|
package/gen/kinds.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import * as N from "./nodes";
|
|
2
|
-
export declare type PrintableKind = N.File | N.Program | N.Identifier | N.BlockStatement | N.EmptyStatement | N.ExpressionStatement | N.IfStatement | N.LabeledStatement | N.BreakStatement | N.ContinueStatement | N.WithStatement | N.SwitchStatement | N.SwitchCase | N.ReturnStatement | N.ThrowStatement | N.TryStatement | N.CatchClause | N.WhileStatement | N.DoWhileStatement | N.ForStatement | N.VariableDeclaration | N.ForInStatement | N.DebuggerStatement | N.FunctionDeclaration | N.FunctionExpression | N.VariableDeclarator | N.ThisExpression | N.ArrayExpression | N.ObjectExpression | N.Property | N.Literal | N.SequenceExpression | N.UnaryExpression | N.BinaryExpression | N.AssignmentExpression | N.UpdateExpression | N.LogicalExpression | N.ConditionalExpression | N.NewExpression | N.CallExpression | N.MemberExpression | N.RestElement | N.TypeAnnotation | N.TSTypeAnnotation | N.SpreadElementPattern | N.ArrowFunctionExpression | N.ForOfStatement | N.YieldExpression | N.GeneratorExpression | N.ComprehensionBlock | N.ComprehensionExpression | N.ObjectProperty | N.PropertyPattern | N.ObjectPattern | N.ArrayPattern | N.MethodDefinition | N.SpreadElement | N.AssignmentPattern | N.ClassPropertyDefinition | N.ClassProperty | N.ClassBody | N.ClassDeclaration | N.ClassExpression | N.ImportSpecifier | N.ImportNamespaceSpecifier | N.ImportDefaultSpecifier | N.ImportDeclaration | N.TaggedTemplateExpression | N.TemplateLiteral | N.TemplateElement | N.SpreadProperty | N.SpreadPropertyPattern | N.AwaitExpression | N.
|
|
2
|
+
export declare type PrintableKind = N.File | N.Program | N.Identifier | N.BlockStatement | N.EmptyStatement | N.ExpressionStatement | N.IfStatement | N.LabeledStatement | N.BreakStatement | N.ContinueStatement | N.WithStatement | N.SwitchStatement | N.SwitchCase | N.ReturnStatement | N.ThrowStatement | N.TryStatement | N.CatchClause | N.WhileStatement | N.DoWhileStatement | N.ForStatement | N.VariableDeclaration | N.ForInStatement | N.DebuggerStatement | N.FunctionDeclaration | N.FunctionExpression | N.VariableDeclarator | N.ThisExpression | N.ArrayExpression | N.ObjectExpression | N.Property | N.Literal | N.SequenceExpression | N.UnaryExpression | N.BinaryExpression | N.AssignmentExpression | N.UpdateExpression | N.LogicalExpression | N.ConditionalExpression | N.NewExpression | N.CallExpression | N.MemberExpression | N.RestElement | N.TypeAnnotation | N.TSTypeAnnotation | N.SpreadElementPattern | N.ArrowFunctionExpression | N.ForOfStatement | N.YieldExpression | N.GeneratorExpression | N.ComprehensionBlock | N.ComprehensionExpression | N.ObjectProperty | N.PropertyPattern | N.ObjectPattern | N.ArrayPattern | N.MethodDefinition | N.SpreadElement | N.AssignmentPattern | N.ClassPropertyDefinition | N.ClassProperty | N.ClassBody | N.ClassDeclaration | N.ClassExpression | N.ImportSpecifier | N.ImportNamespaceSpecifier | N.ImportDefaultSpecifier | N.ImportDeclaration | N.TaggedTemplateExpression | N.TemplateLiteral | N.TemplateElement | N.SpreadProperty | N.SpreadPropertyPattern | N.AwaitExpression | N.JSXAttribute | N.JSXIdentifier | N.JSXNamespacedName | N.JSXExpressionContainer | N.JSXMemberExpression | N.JSXSpreadAttribute | N.JSXElement | N.JSXOpeningElement | N.JSXClosingElement | N.JSXFragment | N.JSXText | N.JSXOpeningFragment | N.JSXClosingFragment | N.JSXEmptyExpression | N.JSXSpreadChild | N.TypeParameterDeclaration | N.TSTypeParameterDeclaration | N.TypeParameterInstantiation | N.TSTypeParameterInstantiation | N.ClassImplements | N.TSExpressionWithTypeArguments | N.AnyTypeAnnotation | N.EmptyTypeAnnotation | N.MixedTypeAnnotation | N.VoidTypeAnnotation | N.NumberTypeAnnotation | N.NumberLiteralTypeAnnotation | N.NumericLiteralTypeAnnotation | N.StringTypeAnnotation | N.StringLiteralTypeAnnotation | N.BooleanTypeAnnotation | N.BooleanLiteralTypeAnnotation | N.NullableTypeAnnotation | N.NullLiteralTypeAnnotation | N.NullTypeAnnotation | N.ThisTypeAnnotation | N.ExistsTypeAnnotation | N.ExistentialTypeParam | N.FunctionTypeAnnotation | N.FunctionTypeParam | N.ArrayTypeAnnotation | N.ObjectTypeAnnotation | N.ObjectTypeProperty | N.ObjectTypeSpreadProperty | N.ObjectTypeIndexer | N.ObjectTypeCallProperty | N.ObjectTypeInternalSlot | N.Variance | N.QualifiedTypeIdentifier | N.GenericTypeAnnotation | N.MemberTypeAnnotation | N.UnionTypeAnnotation | N.IntersectionTypeAnnotation | N.TypeofTypeAnnotation | N.TypeParameter | N.InterfaceTypeAnnotation | N.InterfaceExtends | N.InterfaceDeclaration | N.DeclareInterface | N.TypeAlias | N.OpaqueType | N.DeclareTypeAlias | N.DeclareOpaqueType | N.TypeCastExpression | N.TupleTypeAnnotation | N.DeclareVariable | N.DeclareFunction | N.DeclareClass | N.DeclareModule | N.DeclareModuleExports | N.DeclareExportDeclaration | N.ExportSpecifier | N.ExportBatchSpecifier | N.DeclareExportAllDeclaration | N.InferredPredicate | N.DeclaredPredicate | N.ExportDeclaration | N.Block | N.Line | N.Noop | N.DoExpression | N.Super | N.BindExpression | N.Decorator | N.MetaProperty | N.ParenthesizedExpression | N.ExportDefaultDeclaration | N.ExportNamedDeclaration | N.ExportNamespaceSpecifier | N.ExportDefaultSpecifier | N.ExportAllDeclaration | N.CommentBlock | N.CommentLine | N.Directive | N.DirectiveLiteral | N.InterpreterDirective | N.StringLiteral | N.NumericLiteral | N.BigIntLiteral | N.NullLiteral | N.BooleanLiteral | N.RegExpLiteral | N.ObjectMethod | N.ClassPrivateProperty | N.ClassMethod | N.ClassPrivateMethod | N.PrivateName | N.RestProperty | N.ForAwaitStatement | N.Import | N.TSQualifiedName | N.TSTypeReference | N.TSAsExpression | N.TSNonNullExpression | N.TSAnyKeyword | N.TSBigIntKeyword | N.TSBooleanKeyword | N.TSNeverKeyword | N.TSNullKeyword | N.TSNumberKeyword | N.TSObjectKeyword | N.TSStringKeyword | N.TSSymbolKeyword | N.TSUndefinedKeyword | N.TSUnknownKeyword | N.TSVoidKeyword | N.TSThisType | N.TSArrayType | N.TSLiteralType | N.TSUnionType | N.TSIntersectionType | N.TSConditionalType | N.TSInferType | N.TSTypeParameter | N.TSParenthesizedType | N.TSFunctionType | N.TSConstructorType | N.TSDeclareFunction | N.TSDeclareMethod | N.TSMappedType | N.TSTupleType | N.TSRestType | N.TSOptionalType | N.TSIndexedAccessType | N.TSTypeOperator | N.TSIndexSignature | N.TSPropertySignature | N.TSMethodSignature | N.TSTypePredicate | N.TSCallSignatureDeclaration | N.TSConstructSignatureDeclaration | N.TSEnumMember | N.TSTypeQuery | N.TSImportType | N.TSTypeLiteral | N.TSTypeAssertion | N.TSEnumDeclaration | N.TSTypeAliasDeclaration | N.TSModuleBlock | N.TSModuleDeclaration | N.TSImportEqualsDeclaration | N.TSExternalModuleReference | N.TSExportAssignment | N.TSNamespaceExportDeclaration | N.TSInterfaceBody | N.TSInterfaceDeclaration | N.TSParameterProperty | N.OptionalMemberExpression | N.OptionalCallExpression;
|
|
3
3
|
export declare type SourceLocationKind = N.SourceLocation;
|
|
4
|
-
export declare type NodeKind = N.File | N.Program | N.Identifier | N.BlockStatement | N.EmptyStatement | N.ExpressionStatement | N.IfStatement | N.LabeledStatement | N.BreakStatement | N.ContinueStatement | N.WithStatement | N.SwitchStatement | N.SwitchCase | N.ReturnStatement | N.ThrowStatement | N.TryStatement | N.CatchClause | N.WhileStatement | N.DoWhileStatement | N.ForStatement | N.VariableDeclaration | N.ForInStatement | N.DebuggerStatement | N.FunctionDeclaration | N.FunctionExpression | N.VariableDeclarator | N.ThisExpression | N.ArrayExpression | N.ObjectExpression | N.Property | N.Literal | N.SequenceExpression | N.UnaryExpression | N.BinaryExpression | N.AssignmentExpression | N.UpdateExpression | N.LogicalExpression | N.ConditionalExpression | N.NewExpression | N.CallExpression | N.MemberExpression | N.RestElement | N.TypeAnnotation | N.TSTypeAnnotation | N.SpreadElementPattern | N.ArrowFunctionExpression | N.ForOfStatement | N.YieldExpression | N.GeneratorExpression | N.ComprehensionBlock | N.ComprehensionExpression | N.ObjectProperty | N.PropertyPattern | N.ObjectPattern | N.ArrayPattern | N.MethodDefinition | N.SpreadElement | N.AssignmentPattern | N.ClassPropertyDefinition | N.ClassProperty | N.ClassBody | N.ClassDeclaration | N.ClassExpression | N.ImportSpecifier | N.ImportNamespaceSpecifier | N.ImportDefaultSpecifier | N.ImportDeclaration | N.TaggedTemplateExpression | N.TemplateLiteral | N.TemplateElement | N.SpreadProperty | N.SpreadPropertyPattern | N.AwaitExpression | N.
|
|
4
|
+
export declare type NodeKind = N.File | N.Program | N.Identifier | N.BlockStatement | N.EmptyStatement | N.ExpressionStatement | N.IfStatement | N.LabeledStatement | N.BreakStatement | N.ContinueStatement | N.WithStatement | N.SwitchStatement | N.SwitchCase | N.ReturnStatement | N.ThrowStatement | N.TryStatement | N.CatchClause | N.WhileStatement | N.DoWhileStatement | N.ForStatement | N.VariableDeclaration | N.ForInStatement | N.DebuggerStatement | N.FunctionDeclaration | N.FunctionExpression | N.VariableDeclarator | N.ThisExpression | N.ArrayExpression | N.ObjectExpression | N.Property | N.Literal | N.SequenceExpression | N.UnaryExpression | N.BinaryExpression | N.AssignmentExpression | N.UpdateExpression | N.LogicalExpression | N.ConditionalExpression | N.NewExpression | N.CallExpression | N.MemberExpression | N.RestElement | N.TypeAnnotation | N.TSTypeAnnotation | N.SpreadElementPattern | N.ArrowFunctionExpression | N.ForOfStatement | N.YieldExpression | N.GeneratorExpression | N.ComprehensionBlock | N.ComprehensionExpression | N.ObjectProperty | N.PropertyPattern | N.ObjectPattern | N.ArrayPattern | N.MethodDefinition | N.SpreadElement | N.AssignmentPattern | N.ClassPropertyDefinition | N.ClassProperty | N.ClassBody | N.ClassDeclaration | N.ClassExpression | N.ImportSpecifier | N.ImportNamespaceSpecifier | N.ImportDefaultSpecifier | N.ImportDeclaration | N.TaggedTemplateExpression | N.TemplateLiteral | N.TemplateElement | N.SpreadProperty | N.SpreadPropertyPattern | N.AwaitExpression | N.JSXAttribute | N.JSXIdentifier | N.JSXNamespacedName | N.JSXExpressionContainer | N.JSXMemberExpression | N.JSXSpreadAttribute | N.JSXElement | N.JSXOpeningElement | N.JSXClosingElement | N.JSXFragment | N.JSXText | N.JSXOpeningFragment | N.JSXClosingFragment | N.JSXEmptyExpression | N.JSXSpreadChild | N.TypeParameterDeclaration | N.TSTypeParameterDeclaration | N.TypeParameterInstantiation | N.TSTypeParameterInstantiation | N.ClassImplements | N.TSExpressionWithTypeArguments | N.AnyTypeAnnotation | N.EmptyTypeAnnotation | N.MixedTypeAnnotation | N.VoidTypeAnnotation | N.NumberTypeAnnotation | N.NumberLiteralTypeAnnotation | N.NumericLiteralTypeAnnotation | N.StringTypeAnnotation | N.StringLiteralTypeAnnotation | N.BooleanTypeAnnotation | N.BooleanLiteralTypeAnnotation | N.NullableTypeAnnotation | N.NullLiteralTypeAnnotation | N.NullTypeAnnotation | N.ThisTypeAnnotation | N.ExistsTypeAnnotation | N.ExistentialTypeParam | N.FunctionTypeAnnotation | N.FunctionTypeParam | N.ArrayTypeAnnotation | N.ObjectTypeAnnotation | N.ObjectTypeProperty | N.ObjectTypeSpreadProperty | N.ObjectTypeIndexer | N.ObjectTypeCallProperty | N.ObjectTypeInternalSlot | N.Variance | N.QualifiedTypeIdentifier | N.GenericTypeAnnotation | N.MemberTypeAnnotation | N.UnionTypeAnnotation | N.IntersectionTypeAnnotation | N.TypeofTypeAnnotation | N.TypeParameter | N.InterfaceTypeAnnotation | N.InterfaceExtends | N.InterfaceDeclaration | N.DeclareInterface | N.TypeAlias | N.OpaqueType | N.DeclareTypeAlias | N.DeclareOpaqueType | N.TypeCastExpression | N.TupleTypeAnnotation | N.DeclareVariable | N.DeclareFunction | N.DeclareClass | N.DeclareModule | N.DeclareModuleExports | N.DeclareExportDeclaration | N.ExportSpecifier | N.ExportBatchSpecifier | N.DeclareExportAllDeclaration | N.InferredPredicate | N.DeclaredPredicate | N.ExportDeclaration | N.Noop | N.DoExpression | N.Super | N.BindExpression | N.Decorator | N.MetaProperty | N.ParenthesizedExpression | N.ExportDefaultDeclaration | N.ExportNamedDeclaration | N.ExportNamespaceSpecifier | N.ExportDefaultSpecifier | N.ExportAllDeclaration | N.Directive | N.DirectiveLiteral | N.InterpreterDirective | N.StringLiteral | N.NumericLiteral | N.BigIntLiteral | N.NullLiteral | N.BooleanLiteral | N.RegExpLiteral | N.ObjectMethod | N.ClassPrivateProperty | N.ClassMethod | N.ClassPrivateMethod | N.PrivateName | N.RestProperty | N.ForAwaitStatement | N.Import | N.TSQualifiedName | N.TSTypeReference | N.TSAsExpression | N.TSNonNullExpression | N.TSAnyKeyword | N.TSBigIntKeyword | N.TSBooleanKeyword | N.TSNeverKeyword | N.TSNullKeyword | N.TSNumberKeyword | N.TSObjectKeyword | N.TSStringKeyword | N.TSSymbolKeyword | N.TSUndefinedKeyword | N.TSUnknownKeyword | N.TSVoidKeyword | N.TSThisType | N.TSArrayType | N.TSLiteralType | N.TSUnionType | N.TSIntersectionType | N.TSConditionalType | N.TSInferType | N.TSTypeParameter | N.TSParenthesizedType | N.TSFunctionType | N.TSConstructorType | N.TSDeclareFunction | N.TSDeclareMethod | N.TSMappedType | N.TSTupleType | N.TSRestType | N.TSOptionalType | N.TSIndexedAccessType | N.TSTypeOperator | N.TSIndexSignature | N.TSPropertySignature | N.TSMethodSignature | N.TSTypePredicate | N.TSCallSignatureDeclaration | N.TSConstructSignatureDeclaration | N.TSEnumMember | N.TSTypeQuery | N.TSImportType | N.TSTypeLiteral | N.TSTypeAssertion | N.TSEnumDeclaration | N.TSTypeAliasDeclaration | N.TSModuleBlock | N.TSModuleDeclaration | N.TSImportEqualsDeclaration | N.TSExternalModuleReference | N.TSExportAssignment | N.TSNamespaceExportDeclaration | N.TSInterfaceBody | N.TSInterfaceDeclaration | N.TSParameterProperty | N.OptionalMemberExpression | N.OptionalCallExpression;
|
|
5
5
|
export declare type CommentKind = N.Block | N.Line | N.CommentBlock | N.CommentLine;
|
|
6
6
|
export declare type PositionKind = N.Position;
|
|
7
7
|
export declare type FileKind = N.File;
|
|
8
8
|
export declare type ProgramKind = N.Program;
|
|
9
|
-
export declare type StatementKind = N.BlockStatement | N.EmptyStatement | N.ExpressionStatement | N.IfStatement | N.LabeledStatement | N.BreakStatement | N.ContinueStatement | N.WithStatement | N.SwitchStatement | N.ReturnStatement | N.ThrowStatement | N.TryStatement | N.WhileStatement | N.DoWhileStatement | N.ForStatement | N.VariableDeclaration | N.ForInStatement | N.DebuggerStatement | N.FunctionDeclaration | N.ForOfStatement | N.MethodDefinition | N.ClassPropertyDefinition | N.ClassProperty | N.ClassBody | N.ClassDeclaration | N.ImportDeclaration | N.
|
|
9
|
+
export declare type StatementKind = N.BlockStatement | N.EmptyStatement | N.ExpressionStatement | N.IfStatement | N.LabeledStatement | N.BreakStatement | N.ContinueStatement | N.WithStatement | N.SwitchStatement | N.ReturnStatement | N.ThrowStatement | N.TryStatement | N.WhileStatement | N.DoWhileStatement | N.ForStatement | N.VariableDeclaration | N.ForInStatement | N.DebuggerStatement | N.FunctionDeclaration | N.ForOfStatement | N.MethodDefinition | N.ClassPropertyDefinition | N.ClassProperty | N.ClassBody | N.ClassDeclaration | N.ImportDeclaration | N.TSTypeParameterDeclaration | N.InterfaceDeclaration | N.DeclareInterface | N.TypeAlias | N.OpaqueType | N.DeclareTypeAlias | N.DeclareOpaqueType | N.DeclareVariable | N.DeclareFunction | N.DeclareClass | N.DeclareModule | N.DeclareModuleExports | N.DeclareExportDeclaration | N.DeclareExportAllDeclaration | N.ExportDeclaration | N.Noop | N.ExportDefaultDeclaration | N.ExportNamedDeclaration | N.ExportAllDeclaration | N.ClassPrivateProperty | N.ClassMethod | N.ClassPrivateMethod | N.ForAwaitStatement | N.TSDeclareFunction | N.TSDeclareMethod | N.TSIndexSignature | N.TSPropertySignature | N.TSMethodSignature | N.TSCallSignatureDeclaration | N.TSConstructSignatureDeclaration | N.TSEnumDeclaration | N.TSTypeAliasDeclaration | N.TSModuleDeclaration | N.TSImportEqualsDeclaration | N.TSExternalModuleReference | N.TSExportAssignment | N.TSNamespaceExportDeclaration | N.TSInterfaceDeclaration;
|
|
10
10
|
export declare type FunctionKind = N.FunctionDeclaration | N.FunctionExpression | N.ArrowFunctionExpression | N.ObjectMethod | N.ClassMethod | N.ClassPrivateMethod;
|
|
11
|
-
export declare type PatternKind = N.Identifier | N.FunctionExpression | N.ThisExpression | N.ArrayExpression | N.ObjectExpression | N.Literal | N.SequenceExpression | N.UnaryExpression | N.BinaryExpression | N.AssignmentExpression | N.UpdateExpression | N.LogicalExpression | N.ConditionalExpression | N.NewExpression | N.CallExpression | N.MemberExpression | N.RestElement | N.SpreadElementPattern | N.ArrowFunctionExpression | N.YieldExpression | N.GeneratorExpression | N.ComprehensionExpression | N.PropertyPattern | N.ObjectPattern | N.ArrayPattern | N.AssignmentPattern | N.ClassExpression | N.TaggedTemplateExpression | N.TemplateLiteral | N.SpreadPropertyPattern | N.AwaitExpression | N.
|
|
12
|
-
export declare type ExpressionKind = N.Identifier | N.FunctionExpression | N.ThisExpression | N.ArrayExpression | N.ObjectExpression | N.Literal | N.SequenceExpression | N.UnaryExpression | N.BinaryExpression | N.AssignmentExpression | N.UpdateExpression | N.LogicalExpression | N.ConditionalExpression | N.NewExpression | N.CallExpression | N.MemberExpression | N.ArrowFunctionExpression | N.YieldExpression | N.GeneratorExpression | N.ComprehensionExpression | N.ClassExpression | N.TaggedTemplateExpression | N.TemplateLiteral | N.AwaitExpression | N.
|
|
11
|
+
export declare type PatternKind = N.Identifier | N.FunctionExpression | N.ThisExpression | N.ArrayExpression | N.ObjectExpression | N.Literal | N.SequenceExpression | N.UnaryExpression | N.BinaryExpression | N.AssignmentExpression | N.UpdateExpression | N.LogicalExpression | N.ConditionalExpression | N.NewExpression | N.CallExpression | N.MemberExpression | N.RestElement | N.SpreadElementPattern | N.ArrowFunctionExpression | N.YieldExpression | N.GeneratorExpression | N.ComprehensionExpression | N.PropertyPattern | N.ObjectPattern | N.ArrayPattern | N.AssignmentPattern | N.ClassExpression | N.TaggedTemplateExpression | N.TemplateLiteral | N.SpreadPropertyPattern | N.AwaitExpression | N.JSXIdentifier | N.JSXExpressionContainer | N.JSXMemberExpression | N.JSXElement | N.JSXFragment | N.JSXText | N.JSXEmptyExpression | N.JSXSpreadChild | N.TypeCastExpression | N.DoExpression | N.Super | N.BindExpression | N.MetaProperty | N.ParenthesizedExpression | N.DirectiveLiteral | N.StringLiteral | N.NumericLiteral | N.BigIntLiteral | N.NullLiteral | N.BooleanLiteral | N.RegExpLiteral | N.PrivateName | N.Import | N.TSAsExpression | N.TSNonNullExpression | N.TSTypeParameter | N.TSTypeAssertion | N.TSParameterProperty | N.OptionalMemberExpression | N.OptionalCallExpression;
|
|
12
|
+
export declare type ExpressionKind = N.Identifier | N.FunctionExpression | N.ThisExpression | N.ArrayExpression | N.ObjectExpression | N.Literal | N.SequenceExpression | N.UnaryExpression | N.BinaryExpression | N.AssignmentExpression | N.UpdateExpression | N.LogicalExpression | N.ConditionalExpression | N.NewExpression | N.CallExpression | N.MemberExpression | N.ArrowFunctionExpression | N.YieldExpression | N.GeneratorExpression | N.ComprehensionExpression | N.ClassExpression | N.TaggedTemplateExpression | N.TemplateLiteral | N.AwaitExpression | N.JSXIdentifier | N.JSXExpressionContainer | N.JSXMemberExpression | N.JSXElement | N.JSXFragment | N.JSXText | N.JSXEmptyExpression | N.JSXSpreadChild | N.TypeCastExpression | N.DoExpression | N.Super | N.BindExpression | N.MetaProperty | N.ParenthesizedExpression | N.DirectiveLiteral | N.StringLiteral | N.NumericLiteral | N.BigIntLiteral | N.NullLiteral | N.BooleanLiteral | N.RegExpLiteral | N.PrivateName | N.Import | N.TSAsExpression | N.TSNonNullExpression | N.TSTypeParameter | N.TSTypeAssertion | N.OptionalMemberExpression | N.OptionalCallExpression;
|
|
13
13
|
export declare type IdentifierKind = N.Identifier | N.JSXIdentifier | N.TSTypeParameter;
|
|
14
14
|
export declare type BlockStatementKind = N.BlockStatement;
|
|
15
15
|
export declare type EmptyStatementKind = N.EmptyStatement;
|
|
@@ -84,29 +84,6 @@ export declare type TemplateElementKind = N.TemplateElement;
|
|
|
84
84
|
export declare type SpreadPropertyKind = N.SpreadProperty;
|
|
85
85
|
export declare type SpreadPropertyPatternKind = N.SpreadPropertyPattern;
|
|
86
86
|
export declare type AwaitExpressionKind = N.AwaitExpression;
|
|
87
|
-
export declare type LetStatementKind = N.LetStatement;
|
|
88
|
-
export declare type LetExpressionKind = N.LetExpression;
|
|
89
|
-
export declare type GraphExpressionKind = N.GraphExpression;
|
|
90
|
-
export declare type GraphIndexExpressionKind = N.GraphIndexExpression;
|
|
91
|
-
export declare type XMLDefaultDeclarationKind = N.XMLDefaultDeclaration;
|
|
92
|
-
export declare type XMLAnyNameKind = N.XMLAnyName;
|
|
93
|
-
export declare type XMLQualifiedIdentifierKind = N.XMLQualifiedIdentifier;
|
|
94
|
-
export declare type XMLFunctionQualifiedIdentifierKind = N.XMLFunctionQualifiedIdentifier;
|
|
95
|
-
export declare type XMLAttributeSelectorKind = N.XMLAttributeSelector;
|
|
96
|
-
export declare type XMLFilterExpressionKind = N.XMLFilterExpression;
|
|
97
|
-
export declare type XMLKind = N.XML;
|
|
98
|
-
export declare type XMLElementKind = N.XMLElement;
|
|
99
|
-
export declare type XMLListKind = N.XMLList;
|
|
100
|
-
export declare type XMLEscapeKind = N.XMLEscape;
|
|
101
|
-
export declare type XMLTextKind = N.XMLText;
|
|
102
|
-
export declare type XMLStartTagKind = N.XMLStartTag;
|
|
103
|
-
export declare type XMLEndTagKind = N.XMLEndTag;
|
|
104
|
-
export declare type XMLPointTagKind = N.XMLPointTag;
|
|
105
|
-
export declare type XMLNameKind = N.XMLName;
|
|
106
|
-
export declare type XMLAttributeKind = N.XMLAttribute;
|
|
107
|
-
export declare type XMLCdataKind = N.XMLCdata;
|
|
108
|
-
export declare type XMLCommentKind = N.XMLComment;
|
|
109
|
-
export declare type XMLProcessingInstructionKind = N.XMLProcessingInstruction;
|
|
110
87
|
export declare type JSXAttributeKind = N.JSXAttribute;
|
|
111
88
|
export declare type JSXIdentifierKind = N.JSXIdentifier;
|
|
112
89
|
export declare type JSXNamespacedNameKind = N.JSXNamespacedName;
|
|
@@ -127,7 +104,8 @@ export declare type TSTypeParameterDeclarationKind = N.TSTypeParameterDeclaratio
|
|
|
127
104
|
export declare type TypeParameterInstantiationKind = N.TypeParameterInstantiation;
|
|
128
105
|
export declare type TSTypeParameterInstantiationKind = N.TSTypeParameterInstantiation;
|
|
129
106
|
export declare type ClassImplementsKind = N.ClassImplements;
|
|
130
|
-
export declare type TSTypeKind = N.TSExpressionWithTypeArguments | N.TSTypeReference | N.TSAnyKeyword | N.TSBooleanKeyword | N.TSNeverKeyword | N.TSNullKeyword | N.TSNumberKeyword | N.TSObjectKeyword | N.TSStringKeyword | N.TSSymbolKeyword | N.TSUndefinedKeyword | N.TSUnknownKeyword | N.TSVoidKeyword | N.TSThisType | N.TSArrayType | N.TSLiteralType | N.TSUnionType | N.TSIntersectionType | N.TSConditionalType | N.TSInferType | N.TSParenthesizedType | N.TSFunctionType | N.TSConstructorType | N.TSMappedType | N.TSTupleType | N.TSRestType | N.TSOptionalType | N.TSIndexedAccessType | N.TSTypeOperator | N.TSTypeQuery | N.TSTypeLiteral;
|
|
107
|
+
export declare type TSTypeKind = N.TSExpressionWithTypeArguments | N.TSTypeReference | N.TSAnyKeyword | N.TSBigIntKeyword | N.TSBooleanKeyword | N.TSNeverKeyword | N.TSNullKeyword | N.TSNumberKeyword | N.TSObjectKeyword | N.TSStringKeyword | N.TSSymbolKeyword | N.TSUndefinedKeyword | N.TSUnknownKeyword | N.TSVoidKeyword | N.TSThisType | N.TSArrayType | N.TSLiteralType | N.TSUnionType | N.TSIntersectionType | N.TSConditionalType | N.TSInferType | N.TSParenthesizedType | N.TSFunctionType | N.TSConstructorType | N.TSMappedType | N.TSTupleType | N.TSRestType | N.TSOptionalType | N.TSIndexedAccessType | N.TSTypeOperator | N.TSTypeQuery | N.TSImportType | N.TSTypeLiteral;
|
|
108
|
+
export declare type TSHasOptionalTypeParameterInstantiationKind = N.TSExpressionWithTypeArguments | N.TSTypeReference | N.TSImportType;
|
|
131
109
|
export declare type TSExpressionWithTypeArgumentsKind = N.TSExpressionWithTypeArguments;
|
|
132
110
|
export declare type FlowKind = N.AnyTypeAnnotation | N.EmptyTypeAnnotation | N.MixedTypeAnnotation | N.VoidTypeAnnotation | N.NumberTypeAnnotation | N.NumberLiteralTypeAnnotation | N.NumericLiteralTypeAnnotation | N.StringTypeAnnotation | N.StringLiteralTypeAnnotation | N.BooleanTypeAnnotation | N.BooleanLiteralTypeAnnotation | N.NullableTypeAnnotation | N.NullLiteralTypeAnnotation | N.NullTypeAnnotation | N.ThisTypeAnnotation | N.ExistsTypeAnnotation | N.ExistentialTypeParam | N.FunctionTypeAnnotation | N.ArrayTypeAnnotation | N.ObjectTypeAnnotation | N.GenericTypeAnnotation | N.MemberTypeAnnotation | N.UnionTypeAnnotation | N.IntersectionTypeAnnotation | N.TypeofTypeAnnotation | N.TypeParameter | N.InterfaceTypeAnnotation | N.TupleTypeAnnotation | N.InferredPredicate | N.DeclaredPredicate;
|
|
133
111
|
export declare type FlowTypeKind = N.AnyTypeAnnotation | N.EmptyTypeAnnotation | N.MixedTypeAnnotation | N.VoidTypeAnnotation | N.NumberTypeAnnotation | N.NumberLiteralTypeAnnotation | N.NumericLiteralTypeAnnotation | N.StringTypeAnnotation | N.StringLiteralTypeAnnotation | N.BooleanTypeAnnotation | N.BooleanLiteralTypeAnnotation | N.NullableTypeAnnotation | N.NullLiteralTypeAnnotation | N.NullTypeAnnotation | N.ThisTypeAnnotation | N.ExistsTypeAnnotation | N.ExistentialTypeParam | N.FunctionTypeAnnotation | N.ArrayTypeAnnotation | N.ObjectTypeAnnotation | N.GenericTypeAnnotation | N.MemberTypeAnnotation | N.UnionTypeAnnotation | N.IntersectionTypeAnnotation | N.TypeofTypeAnnotation | N.TypeParameter | N.InterfaceTypeAnnotation | N.TupleTypeAnnotation;
|
|
@@ -228,6 +206,7 @@ export declare type TSHasOptionalTypeAnnotationKind = N.TSFunctionType | N.TSCon
|
|
|
228
206
|
export declare type TSAsExpressionKind = N.TSAsExpression;
|
|
229
207
|
export declare type TSNonNullExpressionKind = N.TSNonNullExpression;
|
|
230
208
|
export declare type TSAnyKeywordKind = N.TSAnyKeyword;
|
|
209
|
+
export declare type TSBigIntKeywordKind = N.TSBigIntKeyword;
|
|
231
210
|
export declare type TSBooleanKeywordKind = N.TSBooleanKeyword;
|
|
232
211
|
export declare type TSNeverKeywordKind = N.TSNeverKeyword;
|
|
233
212
|
export declare type TSNullKeywordKind = N.TSNullKeyword;
|
|
@@ -265,6 +244,7 @@ export declare type TSCallSignatureDeclarationKind = N.TSCallSignatureDeclaratio
|
|
|
265
244
|
export declare type TSConstructSignatureDeclarationKind = N.TSConstructSignatureDeclaration;
|
|
266
245
|
export declare type TSEnumMemberKind = N.TSEnumMember;
|
|
267
246
|
export declare type TSTypeQueryKind = N.TSTypeQuery;
|
|
247
|
+
export declare type TSImportTypeKind = N.TSImportType;
|
|
268
248
|
export declare type TSTypeLiteralKind = N.TSTypeLiteral;
|
|
269
249
|
export declare type TSTypeAssertionKind = N.TSTypeAssertion;
|
|
270
250
|
export declare type TSEnumDeclarationKind = N.TSEnumDeclaration;
|