SPeCS Packages Documentation
    Preparing search index...

    Interface Builder<D2, S2, D1, S1>

    Represents a builder class instance for a graph type. For example, an instance of BaseGraph.Builder is a Graph.Builder.

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

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

    Type Parameters

    Implemented by

    Index

    Properties

    buildData: (data: D1) => D2

    Adds data to the data object of the graph.

    Type Declaration

      • (data: D1): D2
      • Parameters

        • data: D1

          The current data object of the graph.

        Returns D2

        The data object to be stored in the graph.

    buildScratchData: (scratchData: S1) => S2

    Adds data to the scratch data object of the graph.

    Type Declaration

      • (scratchData: S1): S2
      • Parameters

        • scratchData: S1

          The current scratch data object of the graph.

        Returns S2

        The scratch data object to be stored in the graph.