/* tslint:disable */ /* eslint-disable */ /** * Runs once when the wasm module is instantiated. Forwards Rust panics to * the JS console instead of the default opaque "unreachable" trap, which * makes debugging panics from JS much easier. */ export function init(): void; /** * Parses Bluebell markup into Akoma Ntoso XML. * * - `text`: the Bluebell markup source. * - `root`: the Python-compatible grammar root to parse with, such as * `"act"`, `"statement"`, `"hier_element_block"`, or `"attachment"`. * - `frbr_uri`: the FRBR work URI for the document, e.g. * `"/akn/za/act/2022/1"`. * - `eid_prefix`: optional `eId` prefix. * - `source`: optional metadata source object with `showAs`, `eid`, and * `href` string fields. `show_as` is also accepted. * * Returns the generated XML as a string. Document roots return a full * `` document; fragment roots return the fragment element. Throws * a JS exception (via `JsError`) if `root` is not recognised, if `frbr_uri` is * not a valid FRBR URI, or if `text` fails to parse as Bluebell markup. */ export function parseToXml(text: string, root: string, frbr_uri: string, eid_prefix?: string | null, source?: any | null): string; /** * Returns the crate version, e.g. `"4.0.0"`. Useful for confirming which * build of the wasm package is loaded at runtime. */ export function version(): string; export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module; export interface InitOutput { readonly memory: WebAssembly.Memory; readonly parseToXml: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => [number, number, number, number]; readonly version: () => [number, number]; readonly init: () => void; readonly __wbindgen_malloc: (a: number, b: number) => number; readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number; readonly __wbindgen_free: (a: number, b: number, c: number) => void; readonly __wbindgen_exn_store: (a: number) => void; readonly __externref_table_alloc: () => number; readonly __wbindgen_externrefs: WebAssembly.Table; readonly __externref_table_dealloc: (a: number) => void; readonly __wbindgen_start: () => void; } export type SyncInitInput = BufferSource | WebAssembly.Module; /** * Instantiates the given `module`, which can either be bytes or * a precompiled `WebAssembly.Module`. * * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated. * * @returns {InitOutput} */ export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput; /** * If `module_or_path` is {RequestInfo} or {URL}, makes a request and * for everything else, calls `WebAssembly.instantiate` directly. * * @param {{ module_or_path: InitInput | Promise }} module_or_path - Passing `InitInput` directly is deprecated. * * @returns {Promise} */ export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise } | InitInput | Promise): Promise;