Modules

Macros

Note: Ignoring more types is not considered as a breaking change.

Note: Ignoring more types is not considered as a breaking change.

Note: Ignoring more types is not considered as a breaking change.

Creates a corresponding operator. This macro is used to make code more readable.

Structs

Visit all children nodes. This converts VisitAll to Visit. The type parameter V should implement VisitAll and All<V> implements Visit.

Array literal.

{key} or {key = value}

Identifier used as a pattern.

Use when only block statements are allowed.

A boolean literal.

Class expression.

export * from 'mod'

export * as foo from 'src';

Function expression.

Wrap a VisitMut as a Fold

Common parts of function and method.

A complete identifier with span.

e.g. 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'

e.g. import * as foo from 'mod.js'.

Represents a invalid node.

The resolver for an archived Invalid

XML-based namespace syntax:

{key: value}

export { foo } from 'mod' export { foo as bar } from 'mod'

A numeric literal.

Object literal.

EsTree RestElement

A string literal.

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 =.

typeof operator

Enums

Constants

Traits

Functions

The returned folder only handles fold_script and fold_module, and typescript nodes are ignored. So if your visitor needs to handle typescript or low-level nodes, you should use as_folder instead.

Returns a Fold which changes all span into DUMMY_SP.

Type Definitions

See Ident for documentation.