Module view

Source

Structs§

AncestorIterator
ArrayLit
Array literal.
ArrayPat
ArrowExpr
AssignExpr
AssignPat
AssignPatProp
{key} or {key = value}
AssignProp
AutoAccessor
AwaitExpr
BigInt
BinExpr
BindingIdent
Identifier used as a pattern.
BlockStmt
Use when only block statements are allowed.
Bool
A boolean literal.
BreakStmt
CallExpr
CatchClause
Class
ClassDecl
ClassExpr
Class expression.
ClassMethod
ClassProp
Comments
ComputedPropName
CondExpr
Constructor
ContinueStmt
DebuggerStmt
Decorator
DoWhileStmt
EmptyStmt
ExportAll
export * from 'mod'
ExportDecl
ExportDefaultDecl
ExportDefaultExpr
Default exports other than direct function expression or class expression.
ExportDefaultSpecifier
ExportNamedSpecifier
ExportNamespaceSpecifier
export * as foo from 'src';
ExprOrSpread
ExprStmt
FnDecl
FnExpr
Function expression.
ForInStmt
ForOfStmt
ForStmt
Function
Common parts of function and method.
GetterProp
Ident
A complete identifier with span.
IdentName
IfStmt
Import
ImportDecl
ImportDefaultSpecifier
e.g. import foo from 'mod.js'
ImportNamedSpecifier
e.g. local = foo, imported = None import { foo } from 'mod.js' e.g. local = bar, imported = Some(foo) for import { foo as bar } from 'mod.js'
ImportStarAsSpecifier
e.g. import * as foo from 'mod.js'.
Invalid
Represents a invalid node.
JSXAttr
JSXClosingElement
JSXClosingFragment
JSXElement
JSXEmptyExpr
JSXExprContainer
JSXFragment
JSXMemberExpr
JSXNamespacedName
XML-based namespace syntax:
JSXOpeningElement
JSXOpeningFragment
JSXSpreadChild
JSXText
KeyValuePatProp
{key: value}
KeyValueProp
LabeledStmt
MemberExpr
MetaPropExpr
MethodProp
Module
ModuleInfo
NamedExport
export { foo } from 'mod' export { foo as bar } from 'mod'
NewExpr
Null
Number
A numeric literal.
ObjectLit
Object literal.
ObjectPat
OptCall
OptChainExpr
Param
ParenExpr
PrivateMethod
PrivateName
PrivateProp
ProgramInfo
Regex
RestPat
EsTree RestElement
ReturnStmt
Script
ScriptInfo
SeqExpr
SetterProp
SpreadElement
StaticBlock
Str
A string literal.
Super
SuperPropExpr
SwitchCase
SwitchStmt
TaggedTpl
ThisExpr
ThrowStmt
Tpl
TplElement
TryStmt
TsArrayType
TsAsExpr
TsCallSignatureDecl
TsConditionalType
TsConstAssertion
TsConstructSignatureDecl
TsConstructorType
TsEnumDecl
TsEnumMember
TsExportAssignment
TypeScript’s own parser uses ExportAssignment for both export default and export =. But for @babel/parser, export default is an ExportDefaultDecl, so a TsExportAssignment is always export =.
TsExprWithTypeArgs
TsExternalModuleRef
TsFnType
TsGetterSignature
TsImportEqualsDecl
TsImportType
TsIndexSignature
TsIndexedAccessType
TsInferType
TsInstantiation
TsInterfaceBody
TsInterfaceDecl
TsIntersectionType
TsKeywordType
TsLitType
TsMappedType
TsMethodSignature
TsModuleBlock
TsModuleDecl
TsNamespaceDecl
TsNamespaceExportDecl
TsNonNullExpr
TsOptionalType
TsParamProp
TsParenthesizedType
TsPropertySignature
TsQualifiedName
TsRestType
TsSatisfiesExpr
TsSetterSignature
TsThisType
TsTplLitType
TsTupleElement
TsTupleType
TsTypeAliasDecl
TsTypeAnn
TsTypeAssertion
TsTypeLit
TsTypeOperator
TsTypeParam
TsTypeParamDecl
TsTypeParamInstantiation
TsTypePredicate
TsTypeQuery
typeof operator
TsTypeRef
TsUnionType
UnaryExpr
UpdateExpr
UsingDecl
VarDecl
VarDeclarator
WhileStmt
WithStmt
YieldExpr

Enums§

Accessibility
AssignOp
AssignTarget
AssignTargetPat
BinaryOp
BlockStmtOrExpr
Callee
ClassMember
Decl
DefaultDecl
EsVersion
Note: This type implements Serailize and Deserialize if serde is enabled, instead of requiring serde-impl feature.
ExportSpecifier
Expr
ForHead
A head for for-in and for-of loop.
ImportPhase
ImportSpecifier
JSXAttrName
JSXAttrOrSpread
JSXAttrValue
JSXElementChild
JSXElementName
JSXExpr
JSXObject
Used for obj property of JSXMemberExpr.
Key
Either a private name or a public name.
Lit
MemberProp
MetaPropKind
MethodKind
ModuleDecl
ModuleExportName
ModuleItem
Node
NodeKind
NodeOrToken
ObjectPatProp
OptChainBase
ParamOrTsParamProp
Pat
Program
A Module or Script node.
ProgramRef
Prop
PropName
PropOrSpread
SimpleAssignTarget
Stmt
SuperProp
TruePlusMinus
TsEntityName
TsEnumMemberId
Invalid: Ident with empty symbol.
TsFnOrConstructorType
TsFnParam
TsKeywordTypeKind
TsLit
TsModuleName
TsModuleRef
TsNamespaceBody
namespace A.B { } is a namespace named A with another TsNamespaceDecl as its body.
TsParamPropParam
TsThisTypeOrIdent
TsType
TsTypeElement
TsTypeOperatorOp
TsTypeQueryExpr
TsUnionOrIntersectionType
UnaryOp
UpdateOp
VarDeclKind
VarDeclOrExpr

Traits§

CastableNode
NodeTrait
TokenExt

Functions§

with_ast_view
with_ast_view_for_module
with_ast_view_for_script