mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-24 04:01:46 +00:00
Improve loader function table handling
This commit is contained in:
5
lib/loader/index.d.ts
vendored
5
lib/loader/index.d.ts
vendored
@ -66,6 +66,11 @@ interface ASUtil {
|
||||
freeArray(ptr: number): void;
|
||||
/** Gets a function by its pointer. */
|
||||
getFunction<R = any>(ptr: number): (...args: any[]) => R;
|
||||
/**
|
||||
* Creates a new function in the module's table and returns its pointer. Note that only actual
|
||||
* WebAssembly functions, i.e. as exported by the module, are supported.
|
||||
*/
|
||||
newFunction(fn: (...args: any[]) => any): number;
|
||||
}
|
||||
|
||||
/** Instantiates an AssemblyScript module using the specified imports. */
|
||||
|
Reference in New Issue
Block a user