Skip to content

Commit

Permalink
update wasm
Browse files Browse the repository at this point in the history
  • Loading branch information
dragazo committed Jul 10, 2024
1 parent 5468ce2 commit 8ef63d9
Show file tree
Hide file tree
Showing 4 changed files with 382 additions and 6 deletions.
2 changes: 0 additions & 2 deletions extensions/StateMachine/pkg/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@
"files": [
"stateflow_trans_ext_bg.wasm",
"stateflow_trans_ext.js",
"stateflow_trans_ext_bg.js",
"stateflow_trans_ext.d.ts"
],
"main": "stateflow_trans_ext.js",
"types": "stateflow_trans_ext.d.ts",
"sideEffects": [
"./stateflow_trans_ext.js",
"./snippets/*"
]
}
33 changes: 33 additions & 0 deletions extensions/StateMachine/pkg/stateflow_trans_ext.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,36 @@ export function transition(proc: any, machine: any, state: any): void;
* @returns {boolean}
*/
export function check_state(proc: any, machine: any, state: any): boolean;

export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;

export interface InitOutput {
readonly memory: WebAssembly.Memory;
readonly transition: (a: number, b: number, c: number) => void;
readonly check_state: (a: number, b: number, c: number) => number;
readonly visualize: () => void;
readonly __wbindgen_malloc: (a: number, b: number) => number;
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
readonly __wbindgen_exn_store: (a: number) => void;
}

export type SyncInitInput = BufferSource | WebAssembly.Module;
/**
* Instantiates the given `module`, which can either be bytes or
* a precompiled `WebAssembly.Module`.
*
* @param {SyncInitInput} module
*
* @returns {InitOutput}
*/
export function initSync(module: SyncInitInput): InitOutput;

/**
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
* for everything else, calls `WebAssembly.instantiate` directly.
*
* @param {InitInput | Promise<InitInput>} module_or_path
*
* @returns {Promise<InitOutput>}
*/
export default function __wbg_init (module_or_path?: InitInput | Promise<InitInput>): Promise<InitOutput>;
Loading

0 comments on commit 8ef63d9

Please sign in to comment.