Codebase list node-ast-types / 2809c92
New upstream version 0.12.1 Julien Puydt 5 years ago
12 changed file(s) with 27 addition(s) and 389 deletion(s). Raw diff Collapse all Expand all
+0
-90
def/e4x.ts less more
0 import { Fork } from "../types";
1 import typesPlugin from "../lib/types";
2 import coreDef from "./core";
3
4 export default function (fork: Fork) {
5 fork.use(coreDef);
6 var types = fork.use(typesPlugin);
7 var def = types.Type.def;
8 var or = types.Type.or;
9
10 // Note that none of these types are buildable because the Mozilla Parser
11 // API doesn't specify any builder functions, and nobody uses E4X anymore.
12
13 def("XMLDefaultDeclaration")
14 .bases("Declaration")
15 .field("namespace", def("Expression"));
16
17 def("XMLAnyName").bases("Expression");
18
19 def("XMLQualifiedIdentifier")
20 .bases("Expression")
21 .field("left", or(def("Identifier"), def("XMLAnyName")))
22 .field("right", or(def("Identifier"), def("Expression")))
23 .field("computed", Boolean);
24
25 def("XMLFunctionQualifiedIdentifier")
26 .bases("Expression")
27 .field("right", or(def("Identifier"), def("Expression")))
28 .field("computed", Boolean);
29
30 def("XMLAttributeSelector")
31 .bases("Expression")
32 .field("attribute", def("Expression"));
33
34 def("XMLFilterExpression")
35 .bases("Expression")
36 .field("left", def("Expression"))
37 .field("right", def("Expression"));
38
39 def("XMLElement")
40 .bases("XML", "Expression")
41 .field("contents", [def("XML")]);
42
43 def("XMLList")
44 .bases("XML", "Expression")
45 .field("contents", [def("XML")]);
46
47 def("XML").bases("Node");
48
49 def("XMLEscape")
50 .bases("XML")
51 .field("expression", def("Expression"));
52
53 def("XMLText")
54 .bases("XML")
55 .field("text", String);
56
57 def("XMLStartTag")
58 .bases("XML")
59 .field("contents", [def("XML")]);
60
61 def("XMLEndTag")
62 .bases("XML")
63 .field("contents", [def("XML")]);
64
65 def("XMLPointTag")
66 .bases("XML")
67 .field("contents", [def("XML")]);
68
69 def("XMLName")
70 .bases("XML")
71 .field("contents", or(String, [def("XML")]));
72
73 def("XMLAttribute")
74 .bases("XML")
75 .field("value", String);
76
77 def("XMLCdata")
78 .bases("XML")
79 .field("contents", String);
80
81 def("XMLComment")
82 .bases("XML")
83 .field("contents", String);
84
85 def("XMLProcessingInstruction")
86 .bases("XML")
87 .field("target", String)
88 .field("contents", or(String, null));
89 };
134134 .field("callProperties",
135135 [def("ObjectTypeCallProperty")],
136136 defaults.emptyArray)
137 .field("inexact", or(Boolean, void 0), defaults["undefined"])
137138 .field("exact", Boolean, defaults["false"])
138139 .field("internalSlots", [def("ObjectTypeInternalSlot")], defaults.emptyArray);
139140
293294 .build("id", "typeParameters", "impltype", "supertype")
294295 .field("id", def("Identifier"))
295296 .field("typeParameters", or(def("TypeParameterDeclaration"), null))
296 .field("implType", def("FlowType"))
297 .field("superType", def("FlowType"));
297 .field("impltype", def("FlowType"))
298 .field("supertype", def("FlowType"));
298299
299300 def("DeclareTypeAlias")
300301 .bases("TypeAlias")
+0
-48
def/mozilla.ts less more
0 import { Fork } from "../types";
1 import coreDef from "./core";
2 import typesPlugin from "../lib/types";
3 import sharedPlugin from "../lib/shared";
4
5 export default function (fork: Fork) {
6 fork.use(coreDef);
7
8 var types = fork.use(typesPlugin);
9 var def = types.Type.def;
10 var or = types.Type.or;
11 var shared = fork.use(sharedPlugin);
12 var geq = shared.geq;
13 var defaults = shared.defaults;
14
15 def("Function")
16 // SpiderMonkey allows expression closures: function(x) x+1
17 .field("body", or(def("BlockStatement"), def("Expression")));
18
19 def("ForInStatement")
20 .build("left", "right", "body", "each")
21 .field("each", Boolean, defaults["false"]);
22
23 def("LetStatement")
24 .bases("Statement")
25 .build("head", "body")
26 // TODO Deviating from the spec by reusing VariableDeclarator here.
27 .field("head", [def("VariableDeclarator")])
28 .field("body", def("Statement"));
29
30 def("LetExpression")
31 .bases("Expression")
32 .build("head", "body")
33 // TODO Deviating from the spec by reusing VariableDeclarator here.
34 .field("head", [def("VariableDeclarator")])
35 .field("body", def("Expression"));
36
37 def("GraphExpression")
38 .bases("Expression")
39 .build("index", "expression")
40 .field("index", geq(0))
41 .field("expression", def("Literal"));
42
43 def("GraphIndexExpression")
44 .bases("Expression")
45 .build("index")
46 .field("index", geq(0));
47 };
284284 (
285285 left: K.VariableDeclarationKind | K.ExpressionKind,
286286 right: K.ExpressionKind,
287 body: K.StatementKind,
288 each?: boolean
287 body: K.StatementKind
289288 ): N.ForInStatement;
290289 from(
291290 params: {
292291 body: K.StatementKind,
293292 comments?: K.CommentKind[] | null,
294 each?: boolean,
295293 left: K.VariableDeclarationKind | K.ExpressionKind,
296294 loc?: K.SourceLocationKind | null,
297295 right: K.ExpressionKind
313311 (
314312 id: K.IdentifierKind,
315313 params: K.PatternKind[],
316 body: K.BlockStatementKind | K.ExpressionKind,
314 body: K.BlockStatementKind,
317315 generator?: boolean,
318316 expression?: boolean
319317 ): N.FunctionDeclaration;
320318 from(
321319 params: {
322320 async?: boolean,
323 body: K.BlockStatementKind | K.ExpressionKind,
321 body: K.BlockStatementKind,
324322 comments?: K.CommentKind[] | null,
325323 defaults?: (K.ExpressionKind | null)[],
326324 expression?: boolean,
339337 (
340338 id: K.IdentifierKind | null | undefined,
341339 params: K.PatternKind[],
342 body: K.BlockStatementKind | K.ExpressionKind,
340 body: K.BlockStatementKind,
343341 generator?: boolean,
344342 expression?: boolean
345343 ): N.FunctionExpression;
346344 from(
347345 params: {
348346 async?: boolean,
349 body: K.BlockStatementKind | K.ExpressionKind,
347 body: K.BlockStatementKind,
350348 comments?: K.CommentKind[] | null,
351349 defaults?: (K.ExpressionKind | null)[],
352350 expression?: boolean,
10731071 ): N.AwaitExpression;
10741072 }
10751073
1076 export interface LetStatementBuilder {
1077 (head: K.VariableDeclaratorKind[], body: K.StatementKind): N.LetStatement;
1078 from(
1079 params: {
1080 body: K.StatementKind,
1081 comments?: K.CommentKind[] | null,
1082 head: K.VariableDeclaratorKind[],
1083 loc?: K.SourceLocationKind | null
1084 }
1085 ): N.LetStatement;
1086 }
1087
1088 export interface LetExpressionBuilder {
1089 (head: K.VariableDeclaratorKind[], body: K.ExpressionKind): N.LetExpression;
1090 from(
1091 params: {
1092 body: K.ExpressionKind,
1093 comments?: K.CommentKind[] | null,
1094 head: K.VariableDeclaratorKind[],
1095 loc?: K.SourceLocationKind | null
1096 }
1097 ): N.LetExpression;
1098 }
1099
1100 export interface GraphExpressionBuilder {
1101 (index: number, expression: K.LiteralKind): N.GraphExpression;
1102 from(
1103 params: {
1104 comments?: K.CommentKind[] | null,
1105 expression: K.LiteralKind,
1106 index: number,
1107 loc?: K.SourceLocationKind | null
1108 }
1109 ): N.GraphExpression;
1110 }
1111
1112 export interface GraphIndexExpressionBuilder {
1113 (index: number): N.GraphIndexExpression;
1114 from(
1115 params: {
1116 comments?: K.CommentKind[] | null,
1117 index: number,
1118 loc?: K.SourceLocationKind | null
1119 }
1120 ): N.GraphIndexExpression;
1121 }
1122
11231074 export interface JSXAttributeBuilder {
11241075 (
11251076 name: K.JSXIdentifierKind | K.JSXNamespacedNameKind,
16271578 comments?: K.CommentKind[] | null,
16281579 exact?: boolean,
16291580 indexers?: K.ObjectTypeIndexerKind[],
1581 inexact?: boolean | undefined,
16301582 internalSlots?: K.ObjectTypeInternalSlotKind[],
16311583 loc?: K.SourceLocationKind | null,
16321584 properties: (K.ObjectTypePropertyKind | K.ObjectTypeSpreadPropertyKind)[]
18991851 export interface OpaqueTypeBuilder {
19001852 (
19011853 id: K.IdentifierKind,
1902 typeParameters: K.TypeParameterDeclarationKind | null
1854 typeParameters: K.TypeParameterDeclarationKind | null,
1855 impltype: K.FlowTypeKind,
1856 supertype: K.FlowTypeKind
19031857 ): N.OpaqueType;
19041858 from(
19051859 params: {
19061860 comments?: K.CommentKind[] | null,
19071861 id: K.IdentifierKind,
1908 implType: K.FlowTypeKind,
1909 loc?: K.SourceLocationKind | null,
1910 superType: K.FlowTypeKind,
1862 impltype: K.FlowTypeKind,
1863 loc?: K.SourceLocationKind | null,
1864 supertype: K.FlowTypeKind,
19111865 typeParameters: K.TypeParameterDeclarationKind | null
19121866 }
19131867 ): N.OpaqueType;
34513405 spreadProperty: SpreadPropertyBuilder;
34523406 spreadPropertyPattern: SpreadPropertyPatternBuilder;
34533407 awaitExpression: AwaitExpressionBuilder;
3454 letStatement: LetStatementBuilder;
3455 letExpression: LetExpressionBuilder;
3456 graphExpression: GraphExpressionBuilder;
3457 graphIndexExpression: GraphIndexExpressionBuilder;
34583408 jsxAttribute: JSXAttributeBuilder;
34593409 jsxIdentifier: JSXIdentifierBuilder;
34603410 jsxNamespacedName: JSXNamespacedNameBuilder;
00 /* !!! THIS FILE WAS AUTO-GENERATED BY `npm run gen` !!! */
11 import * as N from "./nodes";
2 export 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.LetStatement | N.LetExpression | N.GraphExpression | N.GraphIndexExpression | 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.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.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;
2 export 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.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.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;
33 export type SourceLocationKind = N.SourceLocation;
4 export 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.LetStatement | N.LetExpression | N.GraphExpression | N.GraphIndexExpression | 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.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.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;
4 export 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.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.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;
55 export type CommentKind = N.Block | N.Line | N.CommentBlock | N.CommentLine;
66 export type PositionKind = N.Position;
77 export type FileKind = N.File;
88 export type ProgramKind = N.Program;
9 export 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.LetStatement | 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;
9 export 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;
1010 export type FunctionKind = N.FunctionDeclaration | N.FunctionExpression | N.ArrowFunctionExpression | N.ObjectMethod | N.ClassMethod | N.ClassPrivateMethod;
11 export 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.LetExpression | N.GraphExpression | N.GraphIndexExpression | 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 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.LetExpression | N.GraphExpression | N.GraphIndexExpression | 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;
11 export 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 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;
1313 export type IdentifierKind = N.Identifier | N.JSXIdentifier | N.TSTypeParameter;
1414 export type BlockStatementKind = N.BlockStatement;
1515 export type EmptyStatementKind = N.EmptyStatement;
8484 export type SpreadPropertyKind = N.SpreadProperty;
8585 export type SpreadPropertyPatternKind = N.SpreadPropertyPattern;
8686 export type AwaitExpressionKind = N.AwaitExpression;
87 export type LetStatementKind = N.LetStatement;
88 export type LetExpressionKind = N.LetExpression;
89 export type GraphExpressionKind = N.GraphExpression;
90 export type GraphIndexExpressionKind = N.GraphIndexExpression;
91 export type XMLDefaultDeclarationKind = N.XMLDefaultDeclaration;
92 export type XMLAnyNameKind = N.XMLAnyName;
93 export type XMLQualifiedIdentifierKind = N.XMLQualifiedIdentifier;
94 export type XMLFunctionQualifiedIdentifierKind = N.XMLFunctionQualifiedIdentifier;
95 export type XMLAttributeSelectorKind = N.XMLAttributeSelector;
96 export type XMLFilterExpressionKind = N.XMLFilterExpression;
97 export type XMLKind = N.XML;
98 export type XMLElementKind = N.XMLElement;
99 export type XMLListKind = N.XMLList;
100 export type XMLEscapeKind = N.XMLEscape;
101 export type XMLTextKind = N.XMLText;
102 export type XMLStartTagKind = N.XMLStartTag;
103 export type XMLEndTagKind = N.XMLEndTag;
104 export type XMLPointTagKind = N.XMLPointTag;
105 export type XMLNameKind = N.XMLName;
106 export type XMLAttributeKind = N.XMLAttribute;
107 export type XMLCdataKind = N.XMLCdata;
108 export type XMLCommentKind = N.XMLComment;
109 export type XMLProcessingInstructionKind = N.XMLProcessingInstruction;
11087 export type JSXAttributeKind = N.JSXAttribute;
11188 export type JSXIdentifierKind = N.JSXIdentifier;
11289 export type JSXNamespacedNameKind = N.JSXNamespacedName;
8787 SpreadProperty: Type<N.SpreadProperty>;
8888 SpreadPropertyPattern: Type<N.SpreadPropertyPattern>;
8989 AwaitExpression: Type<N.AwaitExpression>;
90 LetStatement: Type<N.LetStatement>;
91 LetExpression: Type<N.LetExpression>;
92 GraphExpression: Type<N.GraphExpression>;
93 GraphIndexExpression: Type<N.GraphIndexExpression>;
94 XMLDefaultDeclaration: Type<N.XMLDefaultDeclaration>;
95 XMLAnyName: Type<N.XMLAnyName>;
96 XMLQualifiedIdentifier: Type<N.XMLQualifiedIdentifier>;
97 XMLFunctionQualifiedIdentifier: Type<N.XMLFunctionQualifiedIdentifier>;
98 XMLAttributeSelector: Type<N.XMLAttributeSelector>;
99 XMLFilterExpression: Type<N.XMLFilterExpression>;
100 XML: Type<N.XML>;
101 XMLElement: Type<N.XMLElement>;
102 XMLList: Type<N.XMLList>;
103 XMLEscape: Type<N.XMLEscape>;
104 XMLText: Type<N.XMLText>;
105 XMLStartTag: Type<N.XMLStartTag>;
106 XMLEndTag: Type<N.XMLEndTag>;
107 XMLPointTag: Type<N.XMLPointTag>;
108 XMLName: Type<N.XMLName>;
109 XMLAttribute: Type<N.XMLAttribute>;
110 XMLCdata: Type<N.XMLCdata>;
111 XMLComment: Type<N.XMLComment>;
112 XMLProcessingInstruction: Type<N.XMLProcessingInstruction>;
11390 JSXAttribute: Type<N.JSXAttribute>;
11491 JSXIdentifier: Type<N.JSXIdentifier>;
11592 JSXNamespacedName: Type<N.JSXNamespacedName>;
4545 export interface Function extends Node {
4646 id: K.IdentifierKind | null;
4747 params: K.PatternKind[];
48 body: K.BlockStatementKind | K.ExpressionKind;
48 body: K.BlockStatementKind;
4949 generator: boolean;
5050 async: boolean;
5151 expression: boolean;
181181 left: K.VariableDeclarationKind | K.ExpressionKind;
182182 right: K.ExpressionKind;
183183 body: K.StatementKind;
184 each: boolean;
185184 }
186185
187186 export interface DebuggerStatement extends Omit<Statement, "type"> {
519518 all: boolean;
520519 }
521520
522 export interface LetStatement extends Omit<Statement, "type"> {
523 type: "LetStatement";
524 head: K.VariableDeclaratorKind[];
525 body: K.StatementKind;
526 }
527
528 export interface LetExpression extends Omit<Expression, "type"> {
529 type: "LetExpression";
530 head: K.VariableDeclaratorKind[];
531 body: K.ExpressionKind;
532 }
533
534 export interface GraphExpression extends Omit<Expression, "type"> {
535 type: "GraphExpression";
536 index: number;
537 expression: K.LiteralKind;
538 }
539
540 export interface GraphIndexExpression extends Omit<Expression, "type"> {
541 type: "GraphIndexExpression";
542 index: number;
543 }
544
545 export interface XMLDefaultDeclaration extends Declaration {
546 namespace: K.ExpressionKind;
547 }
548
549 export interface XMLAnyName extends Expression {}
550
551 export interface XMLQualifiedIdentifier extends Expression {
552 left: K.IdentifierKind | K.XMLAnyNameKind;
553 right: K.IdentifierKind | K.ExpressionKind;
554 computed: boolean;
555 }
556
557 export interface XMLFunctionQualifiedIdentifier extends Expression {
558 right: K.IdentifierKind | K.ExpressionKind;
559 computed: boolean;
560 }
561
562 export interface XMLAttributeSelector extends Expression {
563 attribute: K.ExpressionKind;
564 }
565
566 export interface XMLFilterExpression extends Expression {
567 left: K.ExpressionKind;
568 right: K.ExpressionKind;
569 }
570
571 export interface XML extends Node {}
572
573 export interface XMLElement extends XML, Expression {
574 contents: K.XMLKind[];
575 }
576
577 export interface XMLList extends XML, Expression {
578 contents: K.XMLKind[];
579 }
580
581 export interface XMLEscape extends XML {
582 expression: K.ExpressionKind;
583 }
584
585 export interface XMLText extends XML {
586 text: string;
587 }
588
589 export interface XMLStartTag extends XML {
590 contents: K.XMLKind[];
591 }
592
593 export interface XMLEndTag extends XML {
594 contents: K.XMLKind[];
595 }
596
597 export interface XMLPointTag extends XML {
598 contents: K.XMLKind[];
599 }
600
601 export interface XMLName extends XML {
602 contents: string | K.XMLKind[];
603 }
604
605 export interface XMLAttribute extends XML {
606 value: string;
607 }
608
609 export interface XMLCdata extends XML {
610 contents: string;
611 }
612
613 export interface XMLComment extends XML {
614 contents: string;
615 }
616
617 export interface XMLProcessingInstruction extends XML {
618 target: string;
619 contents: string | null;
620 }
621
622521 export interface JSXAttribute extends Omit<Node, "type"> {
623522 type: "JSXAttribute";
624523 name: K.JSXIdentifierKind | K.JSXNamespacedNameKind;
844743 properties: (K.ObjectTypePropertyKind | K.ObjectTypeSpreadPropertyKind)[];
845744 indexers: K.ObjectTypeIndexerKind[];
846745 callProperties: K.ObjectTypeCallPropertyKind[];
746 inexact: boolean | undefined;
847747 exact: boolean;
848748 internalSlots: K.ObjectTypeInternalSlotKind[];
849749 }
964864 type: "OpaqueType";
965865 id: K.IdentifierKind;
966866 typeParameters: K.TypeParameterDeclarationKind | null;
967 implType: K.FlowTypeKind;
968 superType: K.FlowTypeKind;
867 impltype: K.FlowTypeKind;
868 supertype: K.FlowTypeKind;
969869 }
970870
971871 export interface DeclareTypeAlias extends Omit<TypeAlias, "type"> {
16001500 optional: boolean;
16011501 }
16021502
1603 export type ASTNode = File | Program | Identifier | BlockStatement | EmptyStatement | ExpressionStatement | IfStatement | LabeledStatement | BreakStatement | ContinueStatement | WithStatement | SwitchStatement | SwitchCase | ReturnStatement | ThrowStatement | TryStatement | CatchClause | WhileStatement | DoWhileStatement | ForStatement | VariableDeclaration | ForInStatement | DebuggerStatement | FunctionDeclaration | FunctionExpression | VariableDeclarator | ThisExpression | ArrayExpression | ObjectExpression | Property | Literal | SequenceExpression | UnaryExpression | BinaryExpression | AssignmentExpression | UpdateExpression | LogicalExpression | ConditionalExpression | NewExpression | CallExpression | MemberExpression | RestElement | TypeAnnotation | TSTypeAnnotation | SpreadElementPattern | ArrowFunctionExpression | ForOfStatement | YieldExpression | GeneratorExpression | ComprehensionBlock | ComprehensionExpression | ObjectProperty | PropertyPattern | ObjectPattern | ArrayPattern | MethodDefinition | SpreadElement | AssignmentPattern | ClassPropertyDefinition | ClassProperty | ClassBody | ClassDeclaration | ClassExpression | ImportSpecifier | ImportNamespaceSpecifier | ImportDefaultSpecifier | ImportDeclaration | TaggedTemplateExpression | TemplateLiteral | TemplateElement | SpreadProperty | SpreadPropertyPattern | AwaitExpression | LetStatement | LetExpression | GraphExpression | GraphIndexExpression | JSXAttribute | JSXIdentifier | JSXNamespacedName | JSXExpressionContainer | JSXMemberExpression | JSXSpreadAttribute | JSXElement | JSXOpeningElement | JSXClosingElement | JSXFragment | JSXText | JSXOpeningFragment | JSXClosingFragment | JSXEmptyExpression | JSXSpreadChild | TypeParameterDeclaration | TSTypeParameterDeclaration | TypeParameterInstantiation | TSTypeParameterInstantiation | ClassImplements | TSExpressionWithTypeArguments | AnyTypeAnnotation | EmptyTypeAnnotation | MixedTypeAnnotation | VoidTypeAnnotation | NumberTypeAnnotation | NumberLiteralTypeAnnotation | NumericLiteralTypeAnnotation | StringTypeAnnotation | StringLiteralTypeAnnotation | BooleanTypeAnnotation | BooleanLiteralTypeAnnotation | NullableTypeAnnotation | NullLiteralTypeAnnotation | NullTypeAnnotation | ThisTypeAnnotation | ExistsTypeAnnotation | ExistentialTypeParam | FunctionTypeAnnotation | FunctionTypeParam | ArrayTypeAnnotation | ObjectTypeAnnotation | ObjectTypeProperty | ObjectTypeSpreadProperty | ObjectTypeIndexer | ObjectTypeCallProperty | ObjectTypeInternalSlot | Variance | QualifiedTypeIdentifier | GenericTypeAnnotation | MemberTypeAnnotation | UnionTypeAnnotation | IntersectionTypeAnnotation | TypeofTypeAnnotation | TypeParameter | InterfaceTypeAnnotation | InterfaceExtends | InterfaceDeclaration | DeclareInterface | TypeAlias | OpaqueType | DeclareTypeAlias | DeclareOpaqueType | TypeCastExpression | TupleTypeAnnotation | DeclareVariable | DeclareFunction | DeclareClass | DeclareModule | DeclareModuleExports | DeclareExportDeclaration | ExportSpecifier | ExportBatchSpecifier | DeclareExportAllDeclaration | InferredPredicate | DeclaredPredicate | ExportDeclaration | Block | Line | Noop | DoExpression | Super | BindExpression | Decorator | MetaProperty | ParenthesizedExpression | ExportDefaultDeclaration | ExportNamedDeclaration | ExportNamespaceSpecifier | ExportDefaultSpecifier | ExportAllDeclaration | CommentBlock | CommentLine | Directive | DirectiveLiteral | InterpreterDirective | StringLiteral | NumericLiteral | BigIntLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | ObjectMethod | ClassPrivateProperty | ClassMethod | ClassPrivateMethod | PrivateName | RestProperty | ForAwaitStatement | Import | TSQualifiedName | TSTypeReference | TSAsExpression | TSNonNullExpression | TSAnyKeyword | TSBooleanKeyword | TSNeverKeyword | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSStringKeyword | TSSymbolKeyword | TSUndefinedKeyword | TSUnknownKeyword | TSVoidKeyword | TSThisType | TSArrayType | TSLiteralType | TSUnionType | TSIntersectionType | TSConditionalType | TSInferType | TSTypeParameter | TSParenthesizedType | TSFunctionType | TSConstructorType | TSDeclareFunction | TSDeclareMethod | TSMappedType | TSTupleType | TSRestType | TSOptionalType | TSIndexedAccessType | TSTypeOperator | TSIndexSignature | TSPropertySignature | TSMethodSignature | TSTypePredicate | TSCallSignatureDeclaration | TSConstructSignatureDeclaration | TSEnumMember | TSTypeQuery | TSTypeLiteral | TSTypeAssertion | TSEnumDeclaration | TSTypeAliasDeclaration | TSModuleBlock | TSModuleDeclaration | TSImportEqualsDeclaration | TSExternalModuleReference | TSExportAssignment | TSNamespaceExportDeclaration | TSInterfaceBody | TSInterfaceDeclaration | TSParameterProperty | OptionalMemberExpression | OptionalCallExpression;
1503 export type ASTNode = File | Program | Identifier | BlockStatement | EmptyStatement | ExpressionStatement | IfStatement | LabeledStatement | BreakStatement | ContinueStatement | WithStatement | SwitchStatement | SwitchCase | ReturnStatement | ThrowStatement | TryStatement | CatchClause | WhileStatement | DoWhileStatement | ForStatement | VariableDeclaration | ForInStatement | DebuggerStatement | FunctionDeclaration | FunctionExpression | VariableDeclarator | ThisExpression | ArrayExpression | ObjectExpression | Property | Literal | SequenceExpression | UnaryExpression | BinaryExpression | AssignmentExpression | UpdateExpression | LogicalExpression | ConditionalExpression | NewExpression | CallExpression | MemberExpression | RestElement | TypeAnnotation | TSTypeAnnotation | SpreadElementPattern | ArrowFunctionExpression | ForOfStatement | YieldExpression | GeneratorExpression | ComprehensionBlock | ComprehensionExpression | ObjectProperty | PropertyPattern | ObjectPattern | ArrayPattern | MethodDefinition | SpreadElement | AssignmentPattern | ClassPropertyDefinition | ClassProperty | ClassBody | ClassDeclaration | ClassExpression | ImportSpecifier | ImportNamespaceSpecifier | ImportDefaultSpecifier | ImportDeclaration | TaggedTemplateExpression | TemplateLiteral | TemplateElement | SpreadProperty | SpreadPropertyPattern | AwaitExpression | JSXAttribute | JSXIdentifier | JSXNamespacedName | JSXExpressionContainer | JSXMemberExpression | JSXSpreadAttribute | JSXElement | JSXOpeningElement | JSXClosingElement | JSXFragment | JSXText | JSXOpeningFragment | JSXClosingFragment | JSXEmptyExpression | JSXSpreadChild | TypeParameterDeclaration | TSTypeParameterDeclaration | TypeParameterInstantiation | TSTypeParameterInstantiation | ClassImplements | TSExpressionWithTypeArguments | AnyTypeAnnotation | EmptyTypeAnnotation | MixedTypeAnnotation | VoidTypeAnnotation | NumberTypeAnnotation | NumberLiteralTypeAnnotation | NumericLiteralTypeAnnotation | StringTypeAnnotation | StringLiteralTypeAnnotation | BooleanTypeAnnotation | BooleanLiteralTypeAnnotation | NullableTypeAnnotation | NullLiteralTypeAnnotation | NullTypeAnnotation | ThisTypeAnnotation | ExistsTypeAnnotation | ExistentialTypeParam | FunctionTypeAnnotation | FunctionTypeParam | ArrayTypeAnnotation | ObjectTypeAnnotation | ObjectTypeProperty | ObjectTypeSpreadProperty | ObjectTypeIndexer | ObjectTypeCallProperty | ObjectTypeInternalSlot | Variance | QualifiedTypeIdentifier | GenericTypeAnnotation | MemberTypeAnnotation | UnionTypeAnnotation | IntersectionTypeAnnotation | TypeofTypeAnnotation | TypeParameter | InterfaceTypeAnnotation | InterfaceExtends | InterfaceDeclaration | DeclareInterface | TypeAlias | OpaqueType | DeclareTypeAlias | DeclareOpaqueType | TypeCastExpression | TupleTypeAnnotation | DeclareVariable | DeclareFunction | DeclareClass | DeclareModule | DeclareModuleExports | DeclareExportDeclaration | ExportSpecifier | ExportBatchSpecifier | DeclareExportAllDeclaration | InferredPredicate | DeclaredPredicate | ExportDeclaration | Block | Line | Noop | DoExpression | Super | BindExpression | Decorator | MetaProperty | ParenthesizedExpression | ExportDefaultDeclaration | ExportNamedDeclaration | ExportNamespaceSpecifier | ExportDefaultSpecifier | ExportAllDeclaration | CommentBlock | CommentLine | Directive | DirectiveLiteral | InterpreterDirective | StringLiteral | NumericLiteral | BigIntLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | ObjectMethod | ClassPrivateProperty | ClassMethod | ClassPrivateMethod | PrivateName | RestProperty | ForAwaitStatement | Import | TSQualifiedName | TSTypeReference | TSAsExpression | TSNonNullExpression | TSAnyKeyword | TSBooleanKeyword | TSNeverKeyword | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSStringKeyword | TSSymbolKeyword | TSUndefinedKeyword | TSUnknownKeyword | TSVoidKeyword | TSThisType | TSArrayType | TSLiteralType | TSUnionType | TSIntersectionType | TSConditionalType | TSInferType | TSTypeParameter | TSParenthesizedType | TSFunctionType | TSConstructorType | TSDeclareFunction | TSDeclareMethod | TSMappedType | TSTupleType | TSRestType | TSOptionalType | TSIndexedAccessType | TSTypeOperator | TSIndexSignature | TSPropertySignature | TSMethodSignature | TSTypePredicate | TSCallSignatureDeclaration | TSConstructSignatureDeclaration | TSEnumMember | TSTypeQuery | TSTypeLiteral | TSTypeAssertion | TSEnumDeclaration | TSTypeAliasDeclaration | TSModuleBlock | TSModuleDeclaration | TSImportEqualsDeclaration | TSExternalModuleReference | TSExportAssignment | TSNamespaceExportDeclaration | TSInterfaceBody | TSInterfaceDeclaration | TSParameterProperty | OptionalMemberExpression | OptionalCallExpression;
8888 visitSpreadProperty?(this: Context & M, path: NodePath<N.SpreadProperty>): any;
8989 visitSpreadPropertyPattern?(this: Context & M, path: NodePath<N.SpreadPropertyPattern>): any;
9090 visitAwaitExpression?(this: Context & M, path: NodePath<N.AwaitExpression>): any;
91 visitLetStatement?(this: Context & M, path: NodePath<N.LetStatement>): any;
92 visitLetExpression?(this: Context & M, path: NodePath<N.LetExpression>): any;
93 visitGraphExpression?(this: Context & M, path: NodePath<N.GraphExpression>): any;
94 visitGraphIndexExpression?(this: Context & M, path: NodePath<N.GraphIndexExpression>): any;
95 visitXMLDefaultDeclaration?(this: Context & M, path: NodePath<N.XMLDefaultDeclaration>): any;
96 visitXMLAnyName?(this: Context & M, path: NodePath<N.XMLAnyName>): any;
97 visitXMLQualifiedIdentifier?(this: Context & M, path: NodePath<N.XMLQualifiedIdentifier>): any;
98 visitXMLFunctionQualifiedIdentifier?(this: Context & M, path: NodePath<N.XMLFunctionQualifiedIdentifier>): any;
99 visitXMLAttributeSelector?(this: Context & M, path: NodePath<N.XMLAttributeSelector>): any;
100 visitXMLFilterExpression?(this: Context & M, path: NodePath<N.XMLFilterExpression>): any;
101 visitXML?(this: Context & M, path: NodePath<N.XML>): any;
102 visitXMLElement?(this: Context & M, path: NodePath<N.XMLElement>): any;
103 visitXMLList?(this: Context & M, path: NodePath<N.XMLList>): any;
104 visitXMLEscape?(this: Context & M, path: NodePath<N.XMLEscape>): any;
105 visitXMLText?(this: Context & M, path: NodePath<N.XMLText>): any;
106 visitXMLStartTag?(this: Context & M, path: NodePath<N.XMLStartTag>): any;
107 visitXMLEndTag?(this: Context & M, path: NodePath<N.XMLEndTag>): any;
108 visitXMLPointTag?(this: Context & M, path: NodePath<N.XMLPointTag>): any;
109 visitXMLName?(this: Context & M, path: NodePath<N.XMLName>): any;
110 visitXMLAttribute?(this: Context & M, path: NodePath<N.XMLAttribute>): any;
111 visitXMLCdata?(this: Context & M, path: NodePath<N.XMLCdata>): any;
112 visitXMLComment?(this: Context & M, path: NodePath<N.XMLComment>): any;
113 visitXMLProcessingInstruction?(this: Context & M, path: NodePath<N.XMLProcessingInstruction>): any;
11491 visitJSXAttribute?(this: Context & M, path: NodePath<N.JSXAttribute>): any;
11592 visitJSXIdentifier?(this: Context & M, path: NodePath<N.JSXIdentifier>): any;
11693 visitJSXNamespacedName?(this: Context & M, path: NodePath<N.JSXNamespacedName>): any;
11 import coreDef from "./def/core";
22 import es6Def from "./def/es6";
33 import es7Def from "./def/es7";
4 import mozillaDef from "./def/mozilla";
5 import e4xDef from "./def/e4x";
64 import jsxDef from "./def/jsx";
75 import flowDef from "./def/flow";
86 import esprimaDef from "./def/esprima";
3331 // configure the precise type hierarchy that you need.
3432 es6Def,
3533 es7Def,
36 mozillaDef,
37 e4xDef,
3834 jsxDef,
3935 flowDef,
4036 esprimaDef,
00 {
11 "name": "ast-types",
2 "version": "0.12.0",
2 "version": "0.12.1",
33 "lockfileVersion": 1,
44 "requires": true,
55 "dependencies": {
00 {
11 "author": "Ben Newman <bn@cs.stanford.edu>",
22 "name": "ast-types",
3 "version": "0.12.0",
3 "version": "0.12.1",
44 "description": "Esprima-compatible implementation of the Mozilla JS Parser API",
55 "keywords": [
66 "ast",
1515 import coreDef from "../def/core";
1616 import es6Def from "../def/es6";
1717 import es7Def from "../def/es7";
18 import mozillaDef from "../def/mozilla";
1918 import babelDef from "../def/babel";
2019
2120 var n = types.namedTypes;
14321431 coreDef,
14331432 es6Def,
14341433 es7Def,
1435 mozillaDef,
14361434 ]);
14371435 var b = types.builders;
14381436