* Register async function as asynctify callable in global environment. * * @param name The name of the function. * @param func function to be registered. * @param override Whether overwrite function in existing registry. * * Note: This function is handled via asynctify mechanism.
(
name: string,
func: (...args: Array<any>) => Promise<any>,
override = false
)
| 1787 | * The wasm needs to be compiled with Asynctify |
| 1788 | */ |
| 1789 | registerAsyncifyFunc( |
| 1790 | name: string, |
| 1791 | func: (...args: Array<any>) => Promise<any>, |
| 1792 | override = false |
| 1793 | ): void { |
| 1794 | const asyncWrapped = this.asyncifyHandler.wrapImport(func); |
| 1795 | this.registerFunc(name, asyncWrapped, override); |
| 1796 | } |
| 1797 | |
| 1798 | /** |
| 1799 | * Register an asyncfunction to be global function in the server. |
no test coverage detected