|
| 1 | +/* tslint:disable */ |
| 2 | +/* eslint-disable */ |
| 3 | + |
| 4 | +/** |
| 5 | + * A handle to an opened Vortex file, exposing metadata to JavaScript. |
| 6 | + */ |
| 7 | +export class VortexFileHandle { |
| 8 | + private constructor(); |
| 9 | + free(): void; |
| 10 | + [Symbol.dispose](): void; |
| 11 | + /** |
| 12 | + * The top-level DType of the file as a string. |
| 13 | + */ |
| 14 | + readonly dtype: string; |
| 15 | + /** |
| 16 | + * The total number of rows in the file. |
| 17 | + */ |
| 18 | + readonly row_count: bigint; |
| 19 | +} |
| 20 | + |
| 21 | +/** |
| 22 | + * Initialize the WASM module (sets up panic hook for better error messages). |
| 23 | + */ |
| 24 | +export function init(): void; |
| 25 | + |
| 26 | +/** |
| 27 | + * Open a Vortex file from raw bytes and return a handle for exploration. |
| 28 | + * |
| 29 | + * Call this from JavaScript after reading a `.vortex` file via drag-and-drop. |
| 30 | + */ |
| 31 | +export function open_vortex_file(data: Uint8Array): VortexFileHandle; |
| 32 | + |
| 33 | +export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module; |
| 34 | + |
| 35 | +export interface InitOutput { |
| 36 | + readonly memory: WebAssembly.Memory; |
| 37 | + readonly init: () => void; |
| 38 | + readonly open_vortex_file: (a: number, b: number) => [number, number, number]; |
| 39 | + readonly __wbg_vortexfilehandle_free: (a: number, b: number) => void; |
| 40 | + readonly vortexfilehandle_row_count: (a: number) => bigint; |
| 41 | + readonly vortexfilehandle_dtype: (a: number) => [number, number]; |
| 42 | + readonly wasm_bindgen__closure__destroy__h315b7af3ad8e2911: (a: number, b: number) => void; |
| 43 | + readonly wasm_bindgen__convert__closures_____invoke__hd9aaad206556e4f9: (a: number, b: number, c: any) => [number, number]; |
| 44 | + readonly wasm_bindgen__convert__closures_____invoke__hbcb1741f2446bbd2: (a: number, b: number) => number; |
| 45 | + readonly __wbindgen_exn_store: (a: number) => void; |
| 46 | + readonly __externref_table_alloc: () => number; |
| 47 | + readonly __wbindgen_externrefs: WebAssembly.Table; |
| 48 | + readonly __wbindgen_free: (a: number, b: number, c: number) => void; |
| 49 | + readonly __wbindgen_malloc: (a: number, b: number) => number; |
| 50 | + readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number; |
| 51 | + readonly __externref_table_dealloc: (a: number) => void; |
| 52 | + readonly __wbindgen_start: () => void; |
| 53 | +} |
| 54 | + |
| 55 | +export type SyncInitInput = BufferSource | WebAssembly.Module; |
| 56 | + |
| 57 | +/** |
| 58 | + * Instantiates the given `module`, which can either be bytes or |
| 59 | + * a precompiled `WebAssembly.Module`. |
| 60 | + * |
| 61 | + * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated. |
| 62 | + * |
| 63 | + * @returns {InitOutput} |
| 64 | + */ |
| 65 | +export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput; |
| 66 | + |
| 67 | +/** |
| 68 | + * If `module_or_path` is {RequestInfo} or {URL}, makes a request and |
| 69 | + * for everything else, calls `WebAssembly.instantiate` directly. |
| 70 | + * |
| 71 | + * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated. |
| 72 | + * |
| 73 | + * @returns {Promise<InitOutput>} |
| 74 | + */ |
| 75 | +export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>; |
0 commit comments