Add typings for second argment of demangle (#385)

This commit is contained in:
kazuya kawaguchi 2019-01-09 21:18:17 +09:00 committed by Daniel Wirtz
parent e3e0fe8045
commit 2ec89ee669
2 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@ API
* **instantiateStreaming**<`T`>(response: `Response`, imports?: `WasmImports`): `Promise<ASUtil & T>`<br /> * **instantiateStreaming**<`T`>(response: `Response`, imports?: `WasmImports`): `Promise<ASUtil & T>`<br />
Instantiates an AssemblyScript module from a response using the specified imports. Instantiates an AssemblyScript module from a response using the specified imports.
* **demangle**<`T`>(exports: `WasmExports`): `T`<br /> * **demangle**<`T`>(exports: `WasmExports`, baseModule?: `Object`): `T`<br />
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. 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. **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.

View File

@ -83,4 +83,4 @@ export declare function instantiateBuffer<T extends {}>(buffer: Uint8Array, impo
export declare function instantiateStreaming<T extends {}>(result: Promise<Response>, imports?: ImportsObject): Promise<ASUtil & T>; export declare function instantiateStreaming<T extends {}>(result: Promise<Response>, imports?: ImportsObject): Promise<ASUtil & T>;
/** Demangles an AssemblyScript module's exports to a friendly object structure. */ /** Demangles an AssemblyScript module's exports to a friendly object structure. */
export declare function demangle<T extends {}>(exports: {}): T; export declare function demangle<T extends {}>(exports: {}, baseModule?: {}): T;