Interface TransformEvents

Hierarchy

  • TransformEvents

Properties

Properties

onChange?: ((ast: NoParentNode<Expression>, node: NoParent<Node>, transformer: Transformer) => void)

Type declaration

    • (ast: NoParentNode<Expression>, node: NoParent<Node>, transformer: Transformer): void
    • An optional callback that will be called every time a transformer mutates the AST.

      Parameters

      • ast: NoParentNode<Expression>

        The AST that was transformed.

      • node: NoParent<Node>

        The node that was mutated by the transformer. Descendants of this node may have been mutated as well.

      • transformer: Transformer

        The transformer that mutated the AST.

      Returns void

onPassStart?: ((ast: NoParentNode<Expression>, pass: number) => void)

Type declaration

    • (ast: NoParentNode<Expression>, pass: number): void
    • An optional callback that will be called at the start of every pass.

      Parameters

      • ast: NoParentNode<Expression>

        The AST that will be transformed.

      • pass: number

        The number of the pass that will be performed. Starts at 1.

      Returns void