ast-types
Advanced tools
Comparing version 0.12.1 to 0.12.2
@@ -192,3 +192,3 @@ "use strict";; | ||
var BinaryOperator = or("==", "!=", "===", "!==", "<", "<=", ">", ">=", "<<", ">>", ">>>", "+", "-", "*", "/", "%", "**", "&", // TODO Missing from the Parser API. | ||
"|", "^", "in", "instanceof", ".."); | ||
"|", "^", "in", "instanceof"); | ||
def("BinaryExpression") | ||
@@ -195,0 +195,0 @@ .bases("Expression") |
@@ -34,7 +34,10 @@ "use strict";; | ||
.bases("Node"); | ||
var IdOrQualifiedName = or(def("Identifier"), def("TSQualifiedName")); | ||
var TSEntityName = or(def("Identifier"), def("TSQualifiedName")); | ||
def("TSTypeReference") | ||
.bases("TSType") | ||
.bases("TSType", "TSHasOptionalTypeParameterInstantiation") | ||
.build("typeName", "typeParameters") | ||
.field("typeName", IdOrQualifiedName) | ||
.field("typeName", TSEntityName); | ||
// An abstract (non-buildable) base type that provide a commonly-needed | ||
// optional .typeParameters field. | ||
def("TSHasOptionalTypeParameterInstantiation") | ||
.field("typeParameters", or(def("TSTypeParameterInstantiation"), null), defaults["null"]); | ||
@@ -52,4 +55,4 @@ // An abstract (non-buildable) base type that provide a commonly-needed | ||
.build("left", "right") | ||
.field("left", IdOrQualifiedName) | ||
.field("right", IdOrQualifiedName); | ||
.field("left", TSEntityName) | ||
.field("right", TSEntityName); | ||
def("TSAsExpression") | ||
@@ -67,2 +70,3 @@ .bases("Expression") | ||
"TSAnyKeyword", | ||
"TSBigIntKeyword", | ||
"TSBooleanKeyword", | ||
@@ -232,3 +236,3 @@ "TSNeverKeyword", | ||
.build("exprName") | ||
.field("exprName", IdOrQualifiedName); | ||
.field("exprName", or(TSEntityName, def("TSImportType"))); | ||
// Inferred from Babylon's tsParseTypeMember method. | ||
@@ -281,6 +285,11 @@ var TSTypeMember = or(def("TSCallSignatureDeclaration"), def("TSConstructSignatureDeclaration"), def("TSIndexSignature"), def("TSMethodSignature"), def("TSPropertySignature")); | ||
.build("id", "body") | ||
.field("id", or(StringLiteral, IdOrQualifiedName)) | ||
.field("id", or(StringLiteral, TSEntityName)) | ||
.field("declare", Boolean, defaults["false"]) | ||
.field("global", Boolean, defaults["false"]) | ||
.field("body", or(def("TSModuleBlock"), def("TSModuleDeclaration"), null), defaults["null"]); | ||
def("TSImportType") | ||
.bases("TSType", "TSHasOptionalTypeParameterInstantiation") | ||
.build("argument", "qualifier", "typeParameters") | ||
.field("argument", StringLiteral) | ||
.field("qualifier", or(TSEntityName, void 0), defaults["undefined"]); | ||
def("TSImportEqualsDeclaration") | ||
@@ -291,3 +300,3 @@ .bases("Declaration") | ||
.field("isExport", Boolean, defaults["false"]) | ||
.field("moduleReference", or(IdOrQualifiedName, def("TSExternalModuleReference"))); | ||
.field("moduleReference", or(TSEntityName, def("TSExternalModuleReference"))); | ||
def("TSExternalModuleReference") | ||
@@ -310,10 +319,9 @@ .bases("Declaration") | ||
def("TSExpressionWithTypeArguments") | ||
.bases("TSType") | ||
.bases("TSType", "TSHasOptionalTypeParameterInstantiation") | ||
.build("expression", "typeParameters") | ||
.field("expression", IdOrQualifiedName) | ||
.field("typeParameters", or(def("TSTypeParameterInstantiation"), null), defaults["null"]); | ||
.field("expression", TSEntityName); | ||
def("TSInterfaceDeclaration") | ||
.bases("Declaration", "TSHasOptionalTypeParameters") | ||
.build("id", "body") | ||
.field("id", IdOrQualifiedName) | ||
.field("id", TSEntityName) | ||
.field("declare", Boolean, defaults["false"]) | ||
@@ -320,0 +328,0 @@ .field("extends", or([def("TSExpressionWithTypeArguments")], null), defaults["null"]) |
import * as N from "./nodes"; | ||
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.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; | ||
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; | ||
export declare type SourceLocationKind = N.SourceLocation; | ||
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.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; | ||
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; | ||
export declare type CommentKind = N.Block | N.Line | N.CommentBlock | N.CommentLine; | ||
@@ -107,3 +107,4 @@ export declare type PositionKind = N.Position; | ||
export declare type ClassImplementsKind = N.ClassImplements; | ||
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; | ||
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; | ||
export declare type TSHasOptionalTypeParameterInstantiationKind = N.TSExpressionWithTypeArguments | N.TSTypeReference | N.TSImportType; | ||
export declare type TSExpressionWithTypeArgumentsKind = N.TSExpressionWithTypeArguments; | ||
@@ -209,2 +210,3 @@ 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; | ||
export declare type TSAnyKeywordKind = N.TSAnyKeyword; | ||
export declare type TSBigIntKeywordKind = N.TSBigIntKeyword; | ||
export declare type TSBooleanKeywordKind = N.TSBooleanKeyword; | ||
@@ -247,2 +249,3 @@ export declare type TSNeverKeywordKind = N.TSNeverKeyword; | ||
export declare type TSTypeQueryKind = N.TSTypeQuery; | ||
export declare type TSImportTypeKind = N.TSImportType; | ||
export declare type TSTypeLiteralKind = N.TSTypeLiteral; | ||
@@ -249,0 +252,0 @@ export declare type TSTypeAssertionKind = N.TSTypeAssertion; |
@@ -110,2 +110,3 @@ import { Type } from "../lib/types"; | ||
TSType: Type<N.TSType>; | ||
TSHasOptionalTypeParameterInstantiation: Type<N.TSHasOptionalTypeParameterInstantiation>; | ||
TSExpressionWithTypeArguments: Type<N.TSExpressionWithTypeArguments>; | ||
@@ -211,2 +212,3 @@ Flow: Type<N.Flow>; | ||
TSAnyKeyword: Type<N.TSAnyKeyword>; | ||
TSBigIntKeyword: Type<N.TSBigIntKeyword>; | ||
TSBooleanKeyword: Type<N.TSBooleanKeyword>; | ||
@@ -249,2 +251,3 @@ TSNeverKeyword: Type<N.TSNeverKeyword>; | ||
TSTypeQuery: Type<N.TSTypeQuery>; | ||
TSImportType: Type<N.TSImportType>; | ||
TSTypeLiteral: Type<N.TSTypeLiteral>; | ||
@@ -251,0 +254,0 @@ TSTypeAssertion: Type<N.TSTypeAssertion>; |
@@ -214,3 +214,3 @@ import { Omit } from "../types"; | ||
type: "BinaryExpression"; | ||
operator: "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "<<" | ">>" | ">>>" | "+" | "-" | "*" | "/" | "%" | "**" | "&" | "|" | "^" | "in" | "instanceof" | ".."; | ||
operator: "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "<<" | ">>" | ">>>" | "+" | "-" | "*" | "/" | "%" | "**" | "&" | "|" | "^" | "in" | "instanceof"; | ||
left: K.ExpressionKind; | ||
@@ -536,6 +536,8 @@ right: K.ExpressionKind; | ||
} | ||
export interface TSExpressionWithTypeArguments extends Omit<TSType, "type"> { | ||
export interface TSHasOptionalTypeParameterInstantiation { | ||
typeParameters: K.TSTypeParameterInstantiationKind | null; | ||
} | ||
export interface TSExpressionWithTypeArguments extends Omit<TSType, "type">, TSHasOptionalTypeParameterInstantiation { | ||
type: "TSExpressionWithTypeArguments"; | ||
expression: K.IdentifierKind | K.TSQualifiedNameKind; | ||
typeParameters: K.TSTypeParameterInstantiationKind | null; | ||
} | ||
@@ -977,6 +979,5 @@ export interface Flow extends Node { | ||
} | ||
export interface TSTypeReference extends Omit<TSType, "type"> { | ||
export interface TSTypeReference extends Omit<TSType, "type">, TSHasOptionalTypeParameterInstantiation { | ||
type: "TSTypeReference"; | ||
typeName: K.IdentifierKind | K.TSQualifiedNameKind; | ||
typeParameters: K.TSTypeParameterInstantiationKind | null; | ||
} | ||
@@ -1004,2 +1005,5 @@ export interface TSHasOptionalTypeParameters { | ||
} | ||
export interface TSBigIntKeyword extends Omit<TSType, "type"> { | ||
type: "TSBigIntKeyword"; | ||
} | ||
export interface TSBooleanKeyword extends Omit<TSType, "type"> { | ||
@@ -1177,4 +1181,9 @@ type: "TSBooleanKeyword"; | ||
type: "TSTypeQuery"; | ||
exprName: K.IdentifierKind | K.TSQualifiedNameKind; | ||
exprName: K.IdentifierKind | K.TSQualifiedNameKind | K.TSImportTypeKind; | ||
} | ||
export interface TSImportType extends Omit<TSType, "type">, TSHasOptionalTypeParameterInstantiation { | ||
type: "TSImportType"; | ||
argument: K.StringLiteralKind; | ||
qualifier: K.IdentifierKind | K.TSQualifiedNameKind | undefined; | ||
} | ||
export interface TSTypeLiteral extends Omit<TSType, "type"> { | ||
@@ -1260,2 +1269,2 @@ type: "TSTypeLiteral"; | ||
} | ||
export declare 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; | ||
export declare 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 | TSBigIntKeyword | 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 | TSImportType | TSTypeLiteral | TSTypeAssertion | TSEnumDeclaration | TSTypeAliasDeclaration | TSModuleBlock | TSModuleDeclaration | TSImportEqualsDeclaration | TSExternalModuleReference | TSExportAssignment | TSNamespaceExportDeclaration | TSInterfaceBody | TSInterfaceDeclaration | TSParameterProperty | OptionalMemberExpression | OptionalCallExpression; |
@@ -111,2 +111,3 @@ import { NodePath } from "../lib/node-path"; | ||
visitTSType?(this: Context & M, path: NodePath<N.TSType>): any; | ||
visitTSHasOptionalTypeParameterInstantiation?(this: Context & M, path: NodePath<N.TSHasOptionalTypeParameterInstantiation>): any; | ||
visitTSExpressionWithTypeArguments?(this: Context & M, path: NodePath<N.TSExpressionWithTypeArguments>): any; | ||
@@ -212,2 +213,3 @@ visitFlow?(this: Context & M, path: NodePath<N.Flow>): any; | ||
visitTSAnyKeyword?(this: Context & M, path: NodePath<N.TSAnyKeyword>): any; | ||
visitTSBigIntKeyword?(this: Context & M, path: NodePath<N.TSBigIntKeyword>): any; | ||
visitTSBooleanKeyword?(this: Context & M, path: NodePath<N.TSBooleanKeyword>): any; | ||
@@ -250,2 +252,3 @@ visitTSNeverKeyword?(this: Context & M, path: NodePath<N.TSNeverKeyword>): any; | ||
visitTSTypeQuery?(this: Context & M, path: NodePath<N.TSTypeQuery>): any; | ||
visitTSImportType?(this: Context & M, path: NodePath<N.TSImportType>): any; | ||
visitTSTypeLiteral?(this: Context & M, path: NodePath<N.TSTypeLiteral>): any; | ||
@@ -252,0 +255,0 @@ visitTSTypeAssertion?(this: Context & M, path: NodePath<N.TSTypeAssertion>): any; |
@@ -195,3 +195,3 @@ "use strict";; | ||
var move = getMoves(this, argc - 1, index); | ||
if (move === emptyMoves) { | ||
if (move === emptyMoves && argc <= 1) { | ||
return this; | ||
@@ -198,0 +198,0 @@ } |
{ | ||
"author": "Ben Newman <bn@cs.stanford.edu>", | ||
"name": "ast-types", | ||
"version": "0.12.1", | ||
"version": "0.12.2", | ||
"description": "Esprima-compatible implementation of the Mozilla JS Parser API", | ||
@@ -32,5 +32,4 @@ "keywords": [ | ||
"gen": "ts-node --transpile-only script/gen-types.ts", | ||
"tsc": "tsc --noEmit", | ||
"mocha": "test/run.sh", | ||
"test": "npm run gen && npm run tsc && npm run mocha", | ||
"test": "npm run gen && npm run build && npm run mocha", | ||
"clean": "ts-emit-clean", | ||
@@ -37,0 +36,0 @@ "build": "tsc && ts-add-module-exports", |
@@ -424,3 +424,3 @@ # AST Types [![Build Status](https://travis-ci.org/benjamn/ast-types.svg?branch=master)](https://travis-ci.org/benjamn/ast-types) [![Greenkeeper badge](https://badges.greenkeeper.io/benjamn/ast-types.svg)](https://greenkeeper.io/) | ||
information about variable and function declarations in the scope that | ||
contains `path.node`. See [scope.js](lib/scope.js) for its public | ||
contains `path.node`. See [scope.ts](lib/scope.ts) for its public | ||
interface, which currently includes `.isGlobal`, `.getGlobalScope()`, | ||
@@ -480,9 +480,17 @@ `.depth`, `.declares(name)`, `.lookup(name)`, and `.getBindings()`. | ||
``` | ||
The `def` syntax is used to define all the default AST node types found in | ||
[core.js](def/core.js), | ||
[e4x.js](def/e4x.js), | ||
[es6.js](def/es6.js), | ||
[es7.js](def/es7.js), | ||
[flow.js](def/flow.js), and | ||
[jsx.js](def/jsx.js), so you have | ||
[babel-core.ts](def/babel-core.ts), | ||
[babel.ts](def/babel.ts), | ||
[core.ts](def/core.ts), | ||
[es-proposals.ts](def/es-proposals.ts), | ||
[es6.ts](def/es6.ts), | ||
[es7.ts](def/es7.ts), | ||
[esprima.ts](def/esprima.ts), | ||
[flow.ts](def/flow.ts), | ||
[jsx.ts](def/jsx.ts), | ||
[type-annotations.ts](def/type-annotations.ts), | ||
and | ||
[typescripts.ts](def/typescripts.ts), | ||
so you have | ||
no shortage of examples to learn from. |
Sorry, the diff of this file is too big to display
424878
9258
495