raptor
    Preparing search index...

    Interface ArrayRead<T>

    General Array subpart, constrained to some read-only features.

    interface ArrayRead<T> {
        "[iterator]": () => ArrayIterator<T>;
        at: (index: number) => undefined | T;
        indexOf: (searchElement: T, fromIndex?: number) => number;
        length: number;
        map: <U>(
            callbackfn: (value: T, index: number, array: ArrayRead<T>) => U,
        ) => ArrayRead<U>;
        reduce: <U>(
            callbackfn: (
                previousValue: U,
                currentValue: T,
                currentIndex: number,
                array: ArrayRead<T>,
            ) => U,
            initialValue: U,
        ) => U;
    }

    Type Parameters

    • T

    Implemented by

    Index

    Properties

    "[iterator]": () => ArrayIterator<T>
    at: (index: number) => undefined | T

    Type declaration

      • (index: number): undefined | T
      • Returns the item located at the specified index.

        Parameters

        • index: number

          The zero-based index of the desired code unit. A negative index will count back from the last item.

        Returns undefined | T

    indexOf: (searchElement: T, fromIndex?: number) => number

    Type declaration

      • (searchElement: T, fromIndex?: number): number
      • Returns the index of the first occurrence of a value in an array, or -1 if it is not present.

        Parameters

        • searchElement: T

          The value to locate in the array.

        • OptionalfromIndex: number

          The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.

        Returns number

    length: number
    map: <U>(
        callbackfn: (value: T, index: number, array: ArrayRead<T>) => U,
    ) => ArrayRead<U>
    reduce: <U>(
        callbackfn: (
            previousValue: U,
            currentValue: T,
            currentIndex: number,
            array: ArrayRead<T>,
        ) => U,
        initialValue: U,
    ) => U