Macros§
- op
- Creates a corresponding operator. This macro is used to make code more readable.
Structs§
- Archived
Invalid - An archived
Invalid - Array
Lit - Array literal.
- Array
LitResolver - The resolver for an archived
ArrayLit - Array
Pat - Arrow
Expr - Arrow
Expr Resolver - The resolver for an archived
ArrowExpr - Assign
Expr - Assign
Expr Resolver - The resolver for an archived
AssignExpr - Assign
Pat - Assign
PatProp {key}or{key = value}- Assign
Prop - Auto
Accessor - Await
Expr - Await
Expr Resolver - The resolver for an archived
AwaitExpr - BigInt
- BigInt
Value - A big signed integer type.
- BinExpr
- BinExpr
Resolver - The resolver for an archived
BinExpr - Binding
Ident - Identifier used as a pattern.
- Block
Stmt - Use when only block statements are allowed.
- Bool
- A boolean literal.
- Break
Stmt - Call
Expr - Call
Expr Resolver - The resolver for an archived
CallExpr - Catch
Clause - Class
- Class
Decl - Class
Expr - Class expression.
- Class
Expr Resolver - The resolver for an archived
ClassExpr - Class
Method - Class
Prop - Computed
Prop Name - Cond
Expr - Cond
Expr Resolver - The resolver for an archived
CondExpr - Constructor
- Continue
Stmt - Debugger
Stmt - Decorator
- DoWhile
Stmt - Empty
Stmt - Export
All export * from 'mod'- Export
Decl - Export
Default Decl - Export
Default Expr - Default exports other than direct function expression or class expression.
- Export
Default Specifier - Export
Named Specifier - Export
Namespace Specifier export * as foo from 'src';- Expr
OrSpread - Expr
OrSpread Resolver - The resolver for an archived
ExprOrSpread - Expr
Stmt - FnDecl
- FnExpr
- Function expression.
- FnExpr
Resolver - The resolver for an archived
FnExpr - ForIn
Stmt - ForOf
Stmt - ForStmt
- Function
- Common parts of function and method.
- Getter
Prop - Ident
- A complete identifier with span.
- Ident
Name - IfStmt
- Import
- Import
Decl - Import
Default Specifier - e.g.
import foo from 'mod.js' - Import
Named Specifier - e.g. local = foo, imported = None
import { foo } from 'mod.js'e.g. local = bar, imported = Some(foo) forimport { foo as bar } from 'mod.js' - Import
Resolver - The resolver for an archived
Import - Import
Star AsSpecifier - e.g.
import * as foo from 'mod.js'. - Import
With - According to the current spec
withof crate::ImportDecl can only have strings or idents as keys, can’t be nested, can only have string literals as values: - Import
With Item - Invalid
- Represents a invalid node.
- Invalid
Resolver - The resolver for an archived
Invalid - JSXAttr
- JSXClosing
Element - JSXClosing
Fragment - JSXElement
- JSXEmpty
Expr - JSXExpr
Container - JSXFragment
- JSXMember
Expr - JSXNamespaced
Name - XML-based namespace syntax:
- JSXOpening
Element - JSXOpening
Fragment - JSXSpread
Child - JSXText
- KeyValue
PatProp {key: value}- KeyValue
Prop - Labeled
Stmt - List
Format - Represents the formatting rule for a list of nodes.
- Member
Expr - Member
Expr Resolver - The resolver for an archived
MemberExpr - Meta
Prop Expr - Meta
Prop Expr Resolver - The resolver for an archived
MetaPropExpr - Method
Prop - Module
- Named
Export export { foo } from 'mod'export { foo as bar } from 'mod'- NewExpr
- NewExpr
Resolver - The resolver for an archived
NewExpr - Null
- Number
- A numeric literal.
- Object
Lit - Object literal.
- Object
LitResolver - The resolver for an archived
ObjectLit - Object
Pat - OptCall
- OptCall
Resolver - The resolver for an archived
OptCall - OptChain
Expr - OptChain
Expr Resolver - The resolver for an archived
OptChainExpr - Param
- Paren
Expr - Paren
Expr Resolver - The resolver for an archived
ParenExpr - Private
Method - Private
Name - Private
Prop - Regex
- RestPat
- EsTree
RestElement - Return
Stmt - Script
- SeqExpr
- SeqExpr
Resolver - The resolver for an archived
SeqExpr - Setter
Prop - Spread
Element - Spread
Element Resolver - The resolver for an archived
SpreadElement - Static
Block - Str
- A string literal.
- Super
- Super
Prop Expr - Super
Prop Expr Resolver - The resolver for an archived
SuperPropExpr - Super
Resolver - The resolver for an archived
Super - Switch
Case - Switch
Stmt - Tagged
Tpl - Tagged
TplResolver - The resolver for an archived
TaggedTpl - This
Expr - This
Expr Resolver - The resolver for an archived
ThisExpr - Throw
Stmt - Tpl
- TplElement
- TplElement
Resolver - The resolver for an archived
TplElement - TplResolver
- The resolver for an archived
Tpl - TryStmt
- TsArray
Type - TsAs
Expr - TsCall
Signature Decl - TsConditional
Type - TsConst
Assertion - TsConstruct
Signature Decl - TsConstructor
Type - TsEnum
Decl - TsEnum
Member - TsExport
Assignment - TypeScript’s own parser uses ExportAssignment for both
export defaultandexport =. But for @babel/parser,export defaultis an ExportDefaultDecl, so a TsExportAssignment is alwaysexport =. - TsExpr
With Type Args - TsExternal
Module Ref - TsFn
Type - TsGetter
Signature - TsImport
Call Options - TsImport
Equals Decl - TsImport
Type - TsIndex
Signature - TsIndexed
Access Type - TsInfer
Type - TsInstantiation
- TsInterface
Body - TsInterface
Decl - TsIntersection
Type - TsKeyword
Type - TsLit
Type - TsMapped
Type - TsMethod
Signature - TsModule
Block - TsModule
Decl - TsNamespace
Decl - TsNamespace
Export Decl - TsNon
Null Expr - TsOptional
Type - TsParam
Prop - TsParenthesized
Type - TsProperty
Signature - TsQualified
Name - TsRest
Type - TsSatisfies
Expr - TsSetter
Signature - TsThis
Type - TsTpl
LitType - TsTuple
Element - TsTuple
Type - TsType
Alias Decl - TsType
Ann - TsType
Assertion - TsType
Lit - TsType
Operator - TsType
Param - TsType
Param Decl - TsType
Param Instantiation - TsType
Predicate - TsType
Query typeofoperator- TsType
Ref - TsUnion
Type - Unary
Expr - Unary
Expr Resolver - The resolver for an archived
UnaryExpr - Update
Expr - Update
Expr Resolver - The resolver for an archived
UpdateExpr - Using
Decl - VarDecl
- VarDeclarator
- While
Stmt - With
Stmt - Yield
Expr - Yield
Expr Resolver - The resolver for an archived
YieldExpr
Enums§
- Accessibility
- Archived
Assign Target Pat - An archived
AssignTargetPat - Archived
Simple Assign Target - An archived
SimpleAssignTarget - Assign
Op - Assign
Target - Assign
Target Pat - Assign
Target PatResolver - The resolver for an archived
AssignTargetPat - Assign
Target Resolver - The resolver for an archived
AssignTarget - Binary
Op - Block
Stmt OrExpr - Block
Stmt OrExpr Resolver - The resolver for an archived
BlockStmtOrExpr - Callee
- Callee
Resolver - The resolver for an archived
Callee - Class
Member - Decl
- Default
Decl - EsVersion
- Note: This type implements
SerailizeandDeserializeifserdeis enabled, instead of requiringserde-implfeature. - Export
Specifier - Expr
- Expr
Resolver - The resolver for an archived
Expr - ForHead
- A head for for-in and for-of loop.
- Import
Phase - Import
Specifier - JSXAttr
Name - JSXAttr
OrSpread - JSXAttr
Value - JSXElement
Child - JSXElement
Name - JSXExpr
- JSXObject
- Used for
objproperty ofJSXMemberExpr. - Key
- Either a private name or a public name.
- Lit
- Member
Prop - Member
Prop Resolver - The resolver for an archived
MemberProp - Meta
Prop Kind - Meta
Prop Kind Resolver - The resolver for an archived
MetaPropKind - Method
Kind - Module
Decl - Module
Export Name - Module
Item - Object
PatProp - OptChain
Base - OptChain
Base Resolver - The resolver for an archived
OptChainBase - Param
OrTs Param Prop - Pat
- Program
- Prop
- Prop
Name - Prop
OrSpread - Prop
OrSpread Resolver - The resolver for an archived
PropOrSpread - Simple
Assign Target - Simple
Assign Target Resolver - The resolver for an archived
SimpleAssignTarget - Stmt
- Super
Prop - Super
Prop Resolver - The resolver for an archived
SuperProp - True
Plus Minus - TsEntity
Name - TsEnum
Member Id - Invalid: Ident with empty symbol.
- TsFn
OrConstructor Type - TsFn
Param - TsKeyword
Type Kind - TsLit
- TsModule
Name - TsModule
Ref - TsNamespace
Body namespace A.B { }is a namespace namedAwith another TsNamespaceDecl as its body.- TsParam
Prop Param - TsThis
Type OrIdent - TsType
- TsType
Element - TsType
Operator Op - TsType
Query Expr - TsUnion
OrIntersection Type - UnaryOp
- Update
Op - VarDecl
Kind - VarDecl
OrExpr
Traits§
- EsReserved
- Pass
- A map from the Program to the Program.
- Source
Mapper Ext - SpanExt
Functions§
- fn_pass
- noop_
pass - unsafe_
id ⚠ - This is extremely unsafe so don’t use it unless you know what you are doing.
- unsafe_
id_ ⚠from_ ident - This is extremely unsafe so don’t use it unless you know what you are doing.