Crate swc_ecma_ast
See all swc_ecma_ast's items
Creates a corresponding operator.
Array literal.
{key} or {key = value}
{key}
{key = value}
Use when only block statements are allowed.
Class expression.
export * from 'mod'
export * as foo from 'src';
Function expression.
Common parts of function and method.
Ident with span.
e.g. import foo from 'mod.js'
import foo from 'mod.js'
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'
import { foo } from 'mod.js'
import { foo as bar } from 'mod.js'
e.g. import * as foo from 'mod.js'.
import * as foo from 'mod.js'
Represents a invalid node.
XML-based namespace syntax:
{key: value}
export { foo } from 'mod' export { foo as bar } from 'mod'
export { foo } from 'mod'
export { foo as bar } from 'mod'
Object literal.
EsTree RestElement
RestElement
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 =.
export default
export =
typeof operator
typeof
Used for obj property of JSXMemberExpr.
obj
JSXMemberExpr
namespace A.B { } is a namespace named A with another TsNamespaceDecl as its body.
namespace A.B { }
A