export const Primitive = { Int8: 'Int8', Int16: 'Int16', Int32: 'Int32', Uint8: 'Uint8', Uint16: 'Uint16', Uint32: 'Uint32', Float32: 'Float32', Float64: 'Float64', } export type Primitive = typeof Primitive[keyof typeof Primitive] export type TypedArrayConstructor = any export type TypedArray = | Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array | BigInt64Array | BigUint64Array export interface HeapBuffer { ensureSize(newSize: number): void floats(): Float32Array bytes(): Uint8Array destroy(): void } export interface HeapBufferView { readonly size: number getArray(): TypedArray }