UNPKG

as-loader

Version:
9 lines (8 loc) 1.1 kB
/// <reference path="types/std.d.ts" /> import { Imports } from "@assemblyscript/loader"; import type { WasmModuleInstance, JsModuleInstance, ModuleInstance, AsLoaderModule } from "./types"; import type { Pointer, NonPointerTypes, NullablePointer, PointerCast, PointerCastArray, PointerCastFunction, PointerCastInstance, PointerCastObject } from "./types/pointer"; import type { AsLoaderRuntime } from "./types/runtime"; declare function instantiate<TModule>(module: TModule | string, load: (url: string) => Promise<unknown>, imports?: Imports, fallback?: false, supports?: () => boolean): Promise<WasmModuleInstance<TModule>>; declare function instantiate<TModule>(module: TModule | string, load: (url: string) => Promise<unknown>, imports: Imports | undefined, fallback: true, supports?: () => boolean): Promise<ModuleInstance<TModule>>; export { instantiate, Imports, WasmModuleInstance, JsModuleInstance, ModuleInstance, AsLoaderModule, Pointer, NonPointerTypes, NullablePointer, PointerCast, PointerCastArray, PointerCastFunction, PointerCastInstance, PointerCastObject, AsLoaderRuntime, };