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