mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-04-25 07:02:13 +00:00
Add typings for second argment of demangle (#385)
This commit is contained in:
parent
e3e0fe8045
commit
2ec89ee669
@ -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.
|
||||||
|
2
lib/loader/index.d.ts
vendored
2
lib/loader/index.d.ts
vendored
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user