TypedArray<TType, TFixedLength> Interface
Package: @esfx/struct-type
Declaration
export interface TypedArray<TType extends Type, TFixedLength extends number = number>
Properties
buffer
Declaration
readonly buffer: ArrayBufferLike;
Property Value
byteLength
Declaration
readonly byteLength: number;
Property Value
byteOffset
Declaration
readonly byteOffset: number;
Property Value
length
Declaration
readonly length: TFixedLength;
Property Value
Methods
[Symbol.iterator]()
Declaration
[Symbol.iterator](): IterableIterator<RuntimeType<TType>>;
Returns
at(index)
Declaration
at(index: number): RuntimeType<TType> | undefined;
Parameters
- index
- number
Returns
copyWithin(target, start, end)
Declaration
copyWithin(target: number, start: number, end?: number): this;
Parameters
- target
- number
- start
- number
- end
- number
Returns
entries()
Declaration
entries(): IterableIterator<[number, RuntimeType<TType>]>;
Returns
every(predicate)
Declaration
every(predicate: (value: RuntimeType<TType>, index: number) => unknown): boolean;
Parameters
- predicate
- (value: RuntimeType<TType>, index: number) => unknown
Returns
fill(value, start, end)
Declaration
fill(value: RuntimeType<TType>, start?: number, end?: number): this;
Parameters
- value
- RuntimeType<TType>
- start
- number
- end
- number
Returns
filter(predicate)
Declaration
filter(predicate: (value: RuntimeType<TType>, index: number) => unknown): TypedArray<TType>;
Parameters
- predicate
- (value: RuntimeType<TType>, index: number) => unknown
Returns
find(predicate, fromIndex)
Declaration
find(predicate: (value: RuntimeType<TType>, index: number) => unknown, fromIndex?: number): RuntimeType<TType> | undefined;
Parameters
- predicate
- (value: RuntimeType<TType>, index: number) => unknown
- fromIndex
- number
Returns
findIndex(predicate, fromIndex)
Declaration
findIndex(predicate: (value: RuntimeType<TType>, index: number) => unknown, fromIndex?: number): number;
Parameters
- predicate
- (value: RuntimeType<TType>, index: number) => unknown
- fromIndex
- number
Returns
findLast(predicate, fromIndex)
Declaration
findLast(predicate: (value: RuntimeType<TType>, index: number) => unknown, fromIndex?: number): RuntimeType<TType> | undefined;
Parameters
- predicate
- (value: RuntimeType<TType>, index: number) => unknown
- fromIndex
- number
Returns
findLastIndex(predicate, fromIndex)
Declaration
findLastIndex(predicate: (value: RuntimeType<TType>, index: number) => unknown, fromIndex?: number): number;
Parameters
- predicate
- (value: RuntimeType<TType>, index: number) => unknown
- fromIndex
- number
Returns
forEach(callbackfn)
Declaration
forEach(callbackfn: (value: RuntimeType<TType>, index: number) => void): void;
Parameters
- callbackfn
- (value: RuntimeType<TType>, index: number) => void
Returns
keys()
Declaration
keys(): IterableIterator<number>;
Returns
map(callbackfn)
Declaration
map(callbackfn: (value: RuntimeType<TType>, index: number) => RuntimeType<TType>): TypedArray<TType, TFixedLength>;
Parameters
- callbackfn
- (value: RuntimeType<TType>, index: number) => RuntimeType<TType>
Returns
mapToArray(callbackfn)
Declaration
mapToArray<U>(callbackfn: (value: RuntimeType<TType>, index: number) => U): U[];
Type Parameters
- U
Parameters
- callbackfn
- (value: RuntimeType<TType>, index: number) => U
Returns
reduce(callbackfn)
Declaration
reduce(callbackfn: (previousValue: RuntimeType<TType>, value: RuntimeType<TType>, index: number) => RuntimeType<TType>): RuntimeType<TType>;
Parameters
- callbackfn
- (previousValue: RuntimeType<TType>, value: RuntimeType<TType>, index: number) => RuntimeType<TType>
Returns
reduce(callbackfn, initialValue)
Declaration
reduce<U>(callbackfn: (previousValue: U, value: RuntimeType<TType>, index: number) => U, initialValue: U): U;
Type Parameters
- U
Parameters
- callbackfn
- (previousValue: U, value: RuntimeType<TType>, index: number) => U
- initialValue
- U
Returns
reduceRight(callbackfn)
Declaration
reduceRight(callbackfn: (previousValue: RuntimeType<TType>, value: RuntimeType<TType>, index: number) => RuntimeType<TType>): RuntimeType<TType>;
Parameters
- callbackfn
- (previousValue: RuntimeType<TType>, value: RuntimeType<TType>, index: number) => RuntimeType<TType>
Returns
reduceRight(callbackfn, initialValue)
Declaration
reduceRight<U>(callbackfn: (previousValue: U, value: RuntimeType<TType>, index: number) => U, initialValue: U): U;
Type Parameters
- U
Parameters
- callbackfn
- (previousValue: U, value: RuntimeType<TType>, index: number) => U
- initialValue
- U
Returns
set(array, offset)
Declaration
set(array: ArrayLike<RuntimeType<TType>>, offset?: number): void;
Parameters
- array
- ArrayLike<RuntimeType<TType>>
- offset
- number
Returns
slice(start, end)
Declaration
slice(start?: number, end?: number): TypedArray<TType>;
Parameters
- start
- number
- end
- number
Returns
some(predicate)
Declaration
some(predicate: (value: RuntimeType<TType>, index: number) => unknown): boolean;
Parameters
- predicate
- (value: RuntimeType<TType>, index: number) => unknown
Returns
subarray(start, end)
Declaration
subarray(start?: number, end?: number): TypedArray<TType>;
Parameters
- start
- number
- end
- number
Returns
toArray()
Declaration
toArray(): RuntimeType<TType>[];
Returns
values()
Declaration
values(): IterableIterator<RuntimeType<TType>>;
Returns
writeTo(buffer, byteOffset, byteOrder)
Declaration
writeTo(buffer: ArrayBufferLike, byteOffset?: number, byteOrder?: Endianness): void;
Parameters
- buffer
- ArrayBufferLike
- byteOffset
- number
- byteOrder
- Endianness
Returns