@mathjax/src
    Preparing search index...

    Interface Wrapper<N, C, W>

    The Wrapper interface

    It points to a Node object. Subclasses add methods for the visitor to call.

    interface Wrapper<
        N extends Node<N, C>,
        C extends NodeClass<N, C>,
        W extends Wrapper<N, C, W>,
    > {
        childNodes: W[];
        kind: string;
        node: N;
        walkTree(func: (node: W, data?: any) => void, data?: any): void;
        wrap<T extends Wrapper<N, C, W> = W>(node: N, ...args: any[]): T;
    }

    Type Parameters

    • N extends Node<N, C>

      The Node type being wrapped

    • C extends NodeClass<N, C>

      The NodeClass for the nodes being created

    • W extends Wrapper<N, C, W>

      The Wrapper type being produced

    Implemented by

    Index

    Properties

    Methods

    Properties

    childNodes: W[]

    The wrapped child nodes for the wrapped node

    kind: string

    The kind of this wrapper

    node: N

    The Node object associated with this instance

    Methods

    • Parameters

      • func: (node: W, data?: any) => void

        A function to apply to each wrapper in the tree rooted at this node

      • Optionaldata: any

        Data to pass to the function (as state information)

      Returns void

    • Type Parameters

      • T extends Wrapper<N, C, W> = W

        The class to use for the wrapped node (defaults to W)

      Parameters

      • node: N

        A node to be wrapped

      • ...args: any[]

        Any additional arguments needed when creating the wrapper

      Returns T

      The wrapped node