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;
}
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;
}
Index
Constructors
constructor
- new
Uint8 (length): Uint8ClampedArrayClamped Array Constructor Parameters
- length: number
Returns Uint8ClampedArray
- new
Uint8 (array): Uint8ClampedArrayClamped Array Constructor Parameters
- array: ArrayBufferLike | ArrayLike<number>
Returns Uint8ClampedArray
- new
Uint8 (buffer, byteOffset?, length?): Uint8ClampedArrayClamped Array Constructor Parameters
- buffer: ArrayBufferLike
Optional
byteOffset: numberOptional
length: number
Returns Uint8ClampedArray
- new
Uint8 (elements): Uint8ClampedArrayClamped Array Constructor Parameters
- elements: Iterable<number, any, any>
Returns Uint8ClampedArray
- new
Uint8 (): Uint8ClampedArrayClamped Array Constructor Returns Uint8ClampedArray
Methods
from
- from(arrayLike): Uint8ClampedArray
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
- arrayLike: ArrayLike<number>
- from<T>(arrayLike, mapfn, thisArg?): Uint8ClampedArray
Creates an array from an array-like or iterable object.
Type Parameters
Parameters
Returns Uint8ClampedArray
- from(arrayLike, mapfn?, thisArg?): 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.
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 Uint8ClampedArray
- arrayLike: Iterable<number, any, any>
of
- of(...items): 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
The size in bytes of each element in the array.