SheetXL - v0.8.0-beta.9+sites.210.e2d420901
    Preparing search index...

    Interface IBuilder<T>

    A builder for easily creating tuples that can be either contiguous or non-contiguous. A builder maintains an ordered structure where major and minor values must always increase, otherwise an error will be thrown.

    interface IBuilder<T = any> {
        build(): Region<T>;
        getAt(major: number, minor: number): T | undefined;
        pushAt(major: number, minor: number, value: T): IBuilder<T>;
        pushMultipleAt(
            major: number,
            minor: number,
            value: IListLike<T> | T[],
        ): IBuilder<T>;
    }

    Type Parameters

    • T = any

      The type of values stored within the tuples.

    Implemented by

    Index
    • Constructs and returns the bounded tuples based on the added values. This method can be called multiple times.

      Returns Region<T>

      The built bounded tuples.

    • The value pushed at a position, as pushAt was given it.

      Parameters

      • major: number
      • minor: number

      Returns T | undefined

      undefined if no value is stored there.

    • Adds a single value associated with a specific major and minor index.

      Parameters

      • major: number

        The major index.

      • minor: number

        The minor index.

      • value: T

        The value to be added.

      Returns IBuilder<T>

      Error If the point is out of order compared to previously added points (within the same row).

      If the value is an Array, it will be treated as a discrete value. If you want to set multiple values along the minor axis, then use pushMultipleAt.

    • Adds multiple values associated with a specific major and minor index.

      Parameters

      • major: number

        The major index.

      • minor: number

        The minor index.

      • value: IListLike<T> | T[]

        An array of values to be added.

      Returns IBuilder<T>

      Error If the point is out of order compared to previously added points (within the same row).