SPeCS Packages Documentation
    Preparing search index...

    Interface Builder<D2, S2, D1, S1>

    Represents a builder class instance for an edge type. For example, an instance of BaseEdge.Builder is an Edge.Builder.

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

    interface Builder<
        D2 extends BaseEdge.Data,
        S2 extends BaseEdge.ScratchData,
        D1 extends BaseEdge.Data = BaseEdge.Data,
        S1 extends BaseEdge.ScratchData = BaseEdge.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 edge.

    Type Declaration

      • (data: D1): D2
      • Parameters

        • data: D1

          The current data object of the edge.

        Returns D2

        The data object to be stored in the edge.

    buildScratchData: (scratchData: S1) => S2

    Adds data to the scratch data object of the edge.

    Type Declaration

      • (scratchData: S1): S2
      • Parameters

        • scratchData: S1

          The current scratch data object of the edge.

        Returns S2

        The scratch data object to be stored in the edge.