Represents a builder class instance for a node type. For example, an instance of BaseNode.Builder is a Node.Builder.

The builder class may have a constructor and methods to customize the information that is stored in the node.

interface Builder<D2, S2, D1, S1> {
    buildData: ((data: D1) => D2);
    buildScratchData: ((scratchData: S1) => S2);
}

Type Parameters

Implemented by

Properties

buildData: ((data: D1) => D2)

Adds data to the data object of the node.

Type declaration

    • (data): D2
    • Parameters

      • data: D1

        The current data object of the node.

      Returns D2

      The data object to be stored in the node.

buildScratchData: ((scratchData: S1) => S2)

Adds data to the scratch data object of the node.

Type declaration

    • (scratchData): S2
    • Parameters

      • scratchData: S1

        The current scratch data object of the node.

      Returns S2

      The scratch data object to be stored in the node.