Interface Uint8ClampedArrayConstructor

    interface Uint8ClampedArrayConstructor {
        new Uint8ClampedArrayConstructornew (length: number): Uint8ClampedArray;
        new Uint8ClampedArrayConstructornew (array: ArrayBufferLike | ArrayLike<number>): Uint8ClampedArray;
        new Uint8ClampedArrayConstructornew (buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint8ClampedArray;
        new Uint8ClampedArrayConstructornew (elements: Iterable<number, any, any>): Uint8ClampedArray;
        new Uint8ClampedArrayConstructornew (): Uint8ClampedArray;
        BYTES_PER_ELEMENT: number;
        prototype: Uint8ClampedArray;
        from(arrayLike: ArrayLike<number>): Uint8ClampedArray;
        from<T>(arrayLike: ArrayLike<T>, mapfn: ((v: T, k: number) => number), thisArg?: any): Uint8ClampedArray;
        from(arrayLike: Iterable<number, any, any>, mapfn?: ((v: number, k: number) => number), thisArg?: any): Uint8ClampedArray;
        of(...items: number[]): Uint8ClampedArray;
    }

    Constructors

    Properties

    Methods

    Constructors

    Properties

    BYTES_PER_ELEMENT: number

    The size in bytes of each element in the array.

    Methods

    • Creates an array from an array-like or iterable object.

      Parameters

      • arrayLike: ArrayLike<number>

        An array-like or iterable object to convert to an array.

      Returns Uint8ClampedArray

    • Creates an array from an array-like or iterable object.

      Type Parameters

      • T

      Parameters

      • arrayLike: ArrayLike<T>

        An array-like or iterable object to convert to an array.

      • mapfn: ((v: T, k: number) => number)

        A mapping function to call on every element of the array.

          • (v, k): number
          • Parameters

            • v: T
            • k: number

            Returns number

      • OptionalthisArg: any

        Value of 'this' used to invoke the mapfn.

      Returns Uint8ClampedArray

    • Creates an array from an array-like or iterable object.

      Parameters

      • arrayLike: Iterable<number, any, any>

        An array-like or iterable object to convert to an array.

      • Optionalmapfn: ((v: number, k: number) => number)

        A mapping function to call on every element of the array.

          • (v, k): number
          • Parameters

            • v: number
            • k: number

            Returns number

      • OptionalthisArg: any

        Value of 'this' used to invoke the mapfn.

      Returns Uint8ClampedArray

    • Returns a new array from a set of elements.

      Parameters

      • Rest...items: number[]

        A set of elements to include in the new array object.

      Returns Uint8ClampedArray