import { CommandModuleCache } from './command_module_cache'; import type { IShellWorker } from '../defs_internal'; import type { IJavaScriptModule } from '../types/javascript_module'; import type { IWebAssemblyModule } from '../types/wasm_module'; /** * Loader of JavaScript/WebAssembly modules. Once loaded, a module is cached so that it is faster * to subsequently. * Must be run in a WebWorker. */ export declare class CommandModuleLoader { readonly wasmBaseUrl: string; readonly wasmUrlQueryParamsCallback: (filename: string) => Promise; readonly downloadModuleCallback: IShellWorker.IProxyDownloadModuleCallback; constructor(wasmBaseUrl: string, wasmUrlQueryParamsCallback: (filename: string) => Promise, downloadModuleCallback: IShellWorker.IProxyDownloadModuleCallback); /** * Load the specified JavaScript command module. * If loading fails return undefined, and caller is responsible for reporting this to the user if * appropriate. */ getJavaScriptModule(packageName: string, moduleName: string): Promise; /** * Load the specified WebAssembly command module. * If loading fails return undefined, and caller is responsible for reporting this to the user if * appropriate. */ getWasmModule(packageName: string, moduleName: string): Promise; private _getModule; cache: CommandModuleCache; }