@@ -9,3 +9,37 @@ export function greet(): string;
9
9
* @returns {string }
10
10
*/
11
11
export function namagen ( language_input : string ) : string ;
12
+
13
+ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly . Module ;
14
+
15
+ export interface InitOutput {
16
+ readonly memory : WebAssembly . Memory ;
17
+ readonly greet : ( a : number ) => void ;
18
+ readonly namagen : ( a : number , b : number , c : number ) => void ;
19
+ readonly __wbindgen_add_to_stack_pointer : ( a : number ) => number ;
20
+ readonly __wbindgen_free : ( a : number , b : number ) => void ;
21
+ readonly __wbindgen_malloc : ( a : number ) => number ;
22
+ readonly __wbindgen_realloc : ( a : number , b : number , c : number ) => number ;
23
+ readonly __wbindgen_exn_store : ( a : number ) => void ;
24
+ }
25
+
26
+ export type SyncInitInput = BufferSource | WebAssembly . Module ;
27
+ /**
28
+ * Instantiates the given `module`, which can either be bytes or
29
+ * a precompiled `WebAssembly.Module`.
30
+ *
31
+ * @param {SyncInitInput } module
32
+ *
33
+ * @returns {InitOutput }
34
+ */
35
+ export function initSync ( module : SyncInitInput ) : InitOutput ;
36
+
37
+ /**
38
+ * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
39
+ * for everything else, calls `WebAssembly.instantiate` directly.
40
+ *
41
+ * @param {InitInput | Promise<InitInput> } module_or_path
42
+ *
43
+ * @returns {Promise<InitOutput> }
44
+ */
45
+ export default function init ( module_or_path ?: InitInput | Promise < InitInput > ) : Promise < InitOutput > ;
0 commit comments