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