import { i8, u8, i16, u16, i32, u32, ptr, f32, f64 } from "../../static/types"; import { PHANTOM_RAW_ARRAY_TAG } from './raw-array-tag'; /** * Represents `RawArray` allocated on stack. */ export declare class StackArray { readonly ptr: ptr; [PHANTOM_RAW_ARRAY_TAG]: TItem; getRawPtr(): ptr; private constructor(); /** * Allocates array of `i8` (1-byte signed integer) on stack. * * @param jsArray Javascript array of `i8` to copy to stack. * * @returns StackArray that governs created memory block, you must manually * call `Module.stackRestore(sp)` once you are done using it. */ static allocI8(jsArray: readonly i8[] | Int8Array): StackArray; /** * Allocates array of `u8` (1-byte unsigned integer) on stack. * * @param jsArray Javascript array of `u8` to copy to stack. * * @returns StackArray that governs created memory block, you must manually * call `Module.stackRestore(sp)` once you are done using it. */ static allocU8(jsArray: readonly u8[] | Uint8Array | Uint8ClampedArray): StackArray; /** * Allocates array of `i16` (2-byte signed integer) on stack. * * @param jsArray Javascript array of `i16` to copy to stack. * * @returns StackArray that governs created memory block, you must manually * call `Module.stackRestore(sp)` once you are done using it. */ static allocI16(jsArray: readonly i16[] | Int16Array): StackArray; /** * Allocates array of `u16` (2-byte unsigned integer) on stack. * * @param jsArray Javascript array of `u16` to copy to stack. * * @returns StackArray that governs created memory block, you must manually * call `Module.stackRestore(sp)` once you are done using it. */ static allocU16(jsArray: readonly u16[] | Uint16Array): StackArray; /** * Allocates array of `i32` (4-byte signed integer) on stack. * * @param jsArray Javascript array of `i32` to copy to stack. * * @returns StackArray that governs created memory block, you must manually * call `Module.stackRestore(sp)` once you are done using it. */ static allocI32(jsArray: readonly i32[] | Int32Array): StackArray; /** * Allocates array of `u32` (4-byte unsigned integer) on stack. * * @param jsArray Javascript array of `u32` to copy to stack. * * @returns StackArray that governs created memory block, you must manually * call `Module.stackRestore(sp)` once you are done using it. */ static allocU32(jsArray: readonly u32[] | Uint32Array): StackArray; /** * Allocates array of `ptr` (4-byte pointer) on stack. * * @param jsArray Javascript array of `ptr` to copy to stack. * * @returns StackArray that governs created memory block, you must manually * call `Module.stackRestore(sp)` once you are done using it. */ static allocPtr(jsArray: readonly ptr[] | Int32Array): StackArray>; /** * Allocates array of `f32` (4-byte single precision floating point number) on stack. * * @param jsArray Javascript array of `f32` to copy to stack. * * @returns StackArray that governs created memory block, you must manually * call `Module.stackRestore(sp)` once you are done using it. */ static allocF32(jsArray: readonly f32[] | Float32Array): StackArray; /** * Allocates array of `f64` (8-byte double precision floating point number) on stack. * * @param jsArray Javascript array of `f64` to copy to stack. * * @returns StackArray that governs created memory block, you must manually * call `Module.stackRestore(sp)` once you are done using it. */ static allocF64(jsArray: readonly f64[] | Float64Array): StackArray; } //# sourceMappingURL=stack-array.d.ts.map