Interface Uint16ArrayConstructor
interface Uint16ArrayConstructor {
new Uint16ArrayConstructornew (length: number): Uint16Array;
new Uint16ArrayConstructornew (array: ArrayBufferLike | ArrayLike<number>): Uint16Array;
new Uint16ArrayConstructornew (buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint16Array;
new Uint16ArrayConstructornew (elements: Iterable<number, any, any>): Uint16Array;
new Uint16ArrayConstructornew (): Uint16Array;
BYTES_PER_ELEMENT: number;
prototype: Uint16Array;
from(arrayLike: ArrayLike<number>): Uint16Array;
from<T>(arrayLike: ArrayLike<T>, mapfn: ((v: T, k: number) => number), thisArg?: any): Uint16Array;
from(arrayLike: Iterable<number, any, any>, mapfn?: ((v: number, k: number) => number), thisArg?: any): Uint16Array;
of(...items: number[]): Uint16Array;
}
new Uint16ArrayConstructornew (length: number): Uint16Array;
new Uint16ArrayConstructornew (array: ArrayBufferLike | ArrayLike<number>): Uint16Array;
new Uint16ArrayConstructornew (buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint16Array;
new Uint16ArrayConstructornew (elements: Iterable<number, any, any>): Uint16Array;
new Uint16ArrayConstructornew (): Uint16Array;
BYTES_PER_ELEMENT: number;
prototype: Uint16Array;
from(arrayLike: ArrayLike<number>): Uint16Array;
from<T>(arrayLike: ArrayLike<T>, mapfn: ((v: T, k: number) => number), thisArg?: any): Uint16Array;
from(arrayLike: Iterable<number, any, any>, mapfn?: ((v: number, k: number) => number), thisArg?: any): Uint16Array;
of(...items: number[]): Uint16Array;
}
Index
Constructors
constructor
- new
Uint16 (length): Uint16ArrayArray Constructor Parameters
- length: number
Returns Uint16Array
- new
Uint16 (array): Uint16ArrayArray Constructor Parameters
- array: ArrayBufferLike | ArrayLike<number>
Returns Uint16Array
- new
Uint16 (buffer, byteOffset?, length?): Uint16ArrayArray Constructor Parameters
- buffer: ArrayBufferLike
Optional
byteOffset: numberOptional
length: number
Returns Uint16Array
- new
Uint16 (elements): Uint16ArrayArray Constructor Parameters
- elements: Iterable<number, any, any>
Returns Uint16Array
- new
Uint16 (): Uint16ArrayArray Constructor Returns Uint16Array
Methods
from
- from(arrayLike): Uint16Array
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
- arrayLike: ArrayLike<number>
- from<T>(arrayLike, mapfn, thisArg?): Uint16Array
Creates an array from an array-like or iterable object.
Type Parameters
Parameters
Returns Uint16Array
- from(arrayLike, mapfn?, thisArg?): Uint16Array
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.
Optional
mapfn: ((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
Optional
thisArg: anyValue of 'this' used to invoke the mapfn.
Returns Uint16Array
- arrayLike: Iterable<number, any, any>
of
- of(...items): Uint16Array
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 Uint16Array
The size in bytes of each element in the array.