/* tslint:disable */ /* eslint-disable */ /** * @param {Uint8Array} program * @param {any} canvas * @returns {WasmProgram} */ export function init_program(program: Uint8Array, canvas: any): WasmProgram; /** */ export class WasmProgram { free(): void; /** */ run(): void; /** */ stop(): void; /** * @param {number} k */ key_down(k: number): void; /** * @param {number} k */ key_up(k: number): void; } export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module; export interface InitOutput { readonly memory: WebAssembly.Memory; readonly __wbg_wasmprogram_free: (a: number) => void; readonly wasmprogram_run: (a: number) => void; readonly wasmprogram_stop: (a: number) => void; readonly wasmprogram_key_down: (a: number, b: number) => void; readonly wasmprogram_key_up: (a: number, b: number) => void; readonly init_program: (a: number, b: number, c: number, d: number) => void; readonly __wbindgen_malloc: (a: number) => number; readonly __wbindgen_realloc: (a: number, b: number, c: number) => number; readonly __wbindgen_export_2: WebAssembly.Table; readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__ha6c86cd771a8d952: (a: number, b: number) => void; readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hcd1428021a192dfb: (a: number, b: number, c: number) => void; readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h186574917267b10b: (a: number, b: number) => void; readonly __wbindgen_add_to_stack_pointer: (a: number) => number; readonly __wbindgen_exn_store: (a: number) => void; } /** * Synchronously compiles the given `bytes` and instantiates the WebAssembly module. * * @param {BufferSource} bytes * * @returns {InitOutput} */ export function initSync(bytes: BufferSource): InitOutput; /** * If `module_or_path` is {RequestInfo} or {URL}, makes a request and * for everything else, calls `WebAssembly.instantiate` directly. * * @param {InitInput | Promise} module_or_path * * @returns {Promise} */ export default function init (module_or_path?: InitInput | Promise): Promise;