From 2ec89ee669b733b660efb1d115a7cfaf3b093e70 Mon Sep 17 00:00:00 2001 From: kazuya kawaguchi Date: Wed, 9 Jan 2019 21:18:17 +0900 Subject: [PATCH] Add typings for second argment of demangle (#385) --- lib/loader/README.md | 2 +- lib/loader/index.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/loader/README.md b/lib/loader/README.md index 51095dec..7bc145af 100644 --- a/lib/loader/README.md +++ b/lib/loader/README.md @@ -23,7 +23,7 @@ API * **instantiateStreaming**<`T`>(response: `Response`, imports?: `WasmImports`): `Promise`
Instantiates an AssemblyScript module from a response using the specified imports. -* **demangle**<`T`>(exports: `WasmExports`): `T`
+* **demangle**<`T`>(exports: `WasmExports`, baseModule?: `Object`): `T`
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. **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. diff --git a/lib/loader/index.d.ts b/lib/loader/index.d.ts index 693b015e..b4814d27 100644 --- a/lib/loader/index.d.ts +++ b/lib/loader/index.d.ts @@ -83,4 +83,4 @@ export declare function instantiateBuffer(buffer: Uint8Array, impo export declare function instantiateStreaming(result: Promise, imports?: ImportsObject): Promise; /** Demangles an AssemblyScript module's exports to a friendly object structure. */ -export declare function demangle(exports: {}): T; +export declare function demangle(exports: {}, baseModule?: {}): T;