sbpf_assembler.d.ts 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /* tslint:disable */
  2. /* eslint-disable */
  3. export function assemble(source: string): Uint8Array;
  4. export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
  5. export interface InitOutput {
  6. readonly memory: WebAssembly.Memory;
  7. readonly assemble: (a: number, b: number) => [number, number, number, number];
  8. readonly __wbindgen_malloc: (a: number, b: number) => number;
  9. readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
  10. readonly __wbindgen_export_2: WebAssembly.Table;
  11. readonly __externref_table_dealloc: (a: number) => void;
  12. readonly __wbindgen_free: (a: number, b: number, c: number) => void;
  13. readonly __wbindgen_start: () => void;
  14. }
  15. export type SyncInitInput = BufferSource | WebAssembly.Module;
  16. /**
  17. * Instantiates the given `module`, which can either be bytes or
  18. * a precompiled `WebAssembly.Module`.
  19. *
  20. * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
  21. *
  22. * @returns {InitOutput}
  23. */
  24. export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
  25. /**
  26. * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
  27. * for everything else, calls `WebAssembly.instantiate` directly.
  28. *
  29. * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
  30. *
  31. * @returns {Promise<InitOutput>}
  32. */
  33. export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;