Class TransformerAbstract

A read-and-write visitor.

Subclasses can be used to modify an AST in-place.

To handle specific node types add methods like visitPattern. Then, to descend into children call genericVisit.

Visiting methods must implement the following interface:

interface TransformingMethod {
(this: Transformer, node: AST.BaseNode): AST.BaseNode | undefined;
}

The returned node will replace the original one in the AST. Return undefined to remove the node instead.

Hierarchy

Indexable

[prop: string]: unknown

Constructors

Methods