Interface Uint16ArrayConstructor

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

    Constructors

    Properties

    Methods

    Constructors

    Properties

    BYTES_PER_ELEMENT: number

    The size in bytes of each element in the array.

    prototype: Uint16Array

    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 Uint16Array<ArrayBuffer>

    • 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.

      • OptionalthisArg: any

        Value of 'this' used to invoke the mapfn.

      Returns Uint16Array<ArrayBuffer>

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

      Parameters

      • arrayLike: Iterable<number>

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

      Returns Uint16Array<ArrayBuffer>

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

      Type Parameters

      • T

      Parameters

      • arrayLike: Iterable<T>

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

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

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

      • OptionalthisArg: any

        Value of 'this' used to invoke the mapfn.

      Returns Uint16Array<ArrayBuffer>