Package Exports
- dynamic-typed-array
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (dynamic-typed-array) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
dynamic-typed-array
https://en.wikipedia.org/wiki/Dynamic_array
API:
class DynamicTypedArray<T extends TypedArray> {
constructor(constructor: TypedArrayConstructor<T> = Float64Array,
init: number | ArrayLike<number> | Iterable<number> = 0,
options: DynamicTypedArrayOptions = {});
size(): number;
capacity(): number;
get(index: number): number;
set(index: number, value: number): void;
push(...values: number[]): void;
pop(): number;
forEach(callback: (value: number, index: number) => void, thisArg?: any): void;
[Symbol.iterator](): IterableIterator<number>;
toArray(): number[];
toJSON(): number[];
toString(): string;
}
type TypedArray = ArrayBufferView & ArrayLike<number>;
type TypedArrayConstructor<T extends TypedArray> = {
new (buffer: ArrayBuffer, byteOffset?: number, length?: number): T;
BYTES_PER_ELEMENT: number;
}
type GrowthPolicy = (minCapacity: number) => number;
type Allocator = (minByteLength: number) => ArrayBuffer;
type Deallocator = (buffer: ArrayBuffer) => void;
type Reallocator = (oldBuffer: ArrayBuffer, newByteLength: number,
allocator: Allocator, deallocator: Deallocator) => ArrayBuffer;
type DynamicTypedArrayOptions = {
growthPolicy?: GrowthPolicy;
allocator?: Allocator;
deallocator?: Deallocator;
reallocator?: Reallocator;
}