js-util

Home > rc-js-util > ATypedArrayTuple

ATypedArrayTuple class

Common methods of typed arrays, extend to make typed array tuples.

Signature:

export declare class ATypedArrayTuple<TLength extends number, TArray extends TTypedArray> 

Properties

Property Modifiers Type Description
buffer   ArrayBufferLike The ArrayBuffer instance referenced by the array.
byteLength   number The length in bytes of the array.
byteOffset   number The offset in bytes of the array.
BYTES_PER_ELEMENT   number The size in bytes of each element in the array.
length   TLength The length of the array.
TTypeGuardTypedArray   TArray  

Methods

Method Modifiers Description
copyWithin(_target, _start, _end)   Returns the this object after copying a section of the array identified by start and end to the same array starting at position target
every(_callbackfn, _thisArg)   Determines whether all the members of an array satisfy the specified test.
fill(_value, _start, _end)   Returns the this object after filling the section identified by start and end with value
filter(_callbackfn, _thisArg)   Returns the elements of an array that meet the condition specified in a callback function.
find(_predicate, _thisArg)   Returns the value of the first element in the array where predicate is true, and undefined otherwise.
findIndex(_predicate, _thisArg)   Returns the index of the first element in the array where predicate is true, and -1 otherwise.
forEach(_callbackfn, _thisArg)   Performs the specified action for each element in an array.
indexOf(_searchElement, _fromIndex)   Returns the index of the first occurrence of a value in an array.
join(_separator)   Adds all the elements of an array separated by the specified separator string.
lastIndexOf(_searchElement, _fromIndex)   Returns the index of the last occurrence of a value in an array.
map(_callbackfn, _thisArg)   Calls a defined callback function on each element of an array, and returns an array that contains the results.
reduce(_callbackfn, initialValue)   Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
reduce(_callbackfn, initialValue)   Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
reduceRight(_callbackfn, initialValue)   Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
reduceRight(_callbackfn, initialValue)   Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
reverse()   Reverses the elements in an Array.
set(_array, _offset)   Sets a value or an array of values.
set(_array)   Sets a value or an array of values. Where an offset is not provided the array must be a tuple of the same length. To perform a partial write from the start of the array, set an offset of 0.
slice()    
slice(_start, _end)    
some(_callbackfn, _thisArg)   Determines whether the specified callback function returns true for any element of an array.
sort(_compareFn)   Sorts an array.
subarray(_begin, _end)   Gets a new this view of the ArrayBuffer store for this array, referencing the elements at begin, inclusive, up to end, exclusive.
toLocaleString()   Converts a number to a string by using the current locale.
toString()   Returns a string representation of an array.