Skip to content

Commit 41c8fb5

Browse files
authored
Merge pull request #3 from Far-Reach-Co/publish-npm
Update pkg
2 parents 7f9ec0c + 51bac63 commit 41c8fb5

File tree

4 files changed

+393
-7
lines changed

4 files changed

+393
-7
lines changed

pkg/namagen.d.ts

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,37 @@ export function greet(): string;
99
* @returns {string}
1010
*/
1111
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

Comments
 (0)