declare function defineFunction any>(script: string, options?: { timeout?: number, disposeManually?: boolean, }): Promise; declare interface Context { def: typeof defineFunction; load(script: string, options?: { filename?: string, meta?: Record }): Promise; currentStack: string; wrapHostFunction(f: Function, options?: { returnsHostObject?: boolean; nowrap?: boolean; }): any; inject(target: string, obj: Record): void; dispose(): void; } declare namespace defineFunction { var context: (options?: { wasmFile?: string, loadModuleContent?: (moduleName: string, extra?: { basename: string, filename: string }) => Promise, global?: Record }) => Context; } export default defineFunction;