Skip to content

Commit 2ec89ee

Browse files
kazupondcodeIO
authored andcommitted
Add typings for second argment of demangle (AssemblyScript#385)
1 parent e3e0fe8 commit 2ec89ee

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/loader/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ API
2323
* **instantiateStreaming**<`T`>(response: `Response`, imports?: `WasmImports`): `Promise<ASUtil & T>`<br />
2424
Instantiates an AssemblyScript module from a response using the specified imports.
2525

26-
* **demangle**<`T`>(exports: `WasmExports`): `T`<br />
26+
* **demangle**<`T`>(exports: `WasmExports`, baseModule?: `Object`): `T`<br />
2727
Demangles an AssemblyScript module's exports to a friendly object structure. You usually don't have to call this manually as instantiation does this implicitly.
2828

2929
**Note:** `T` above can either be omitted if the structure of the module is unknown, or can reference a `.d.ts` (i.e. `typeof MyModule`) as produced by the compiler with the `-d` option.

lib/loader/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,4 @@ export declare function instantiateBuffer<T extends {}>(buffer: Uint8Array, impo
8383
export declare function instantiateStreaming<T extends {}>(result: Promise<Response>, imports?: ImportsObject): Promise<ASUtil & T>;
8484

8585
/** Demangles an AssemblyScript module's exports to a friendly object structure. */
86-
export declare function demangle<T extends {}>(exports: {}): T;
86+
export declare function demangle<T extends {}>(exports: {}, baseModule?: {}): T;

0 commit comments

Comments
 (0)