/** The process's sandbox, shared by every engine (created on first use, never released). */ export function sharedSandbox(): any; export const EXPRESSION_LIMITS: Readonly<{ memoryBytes: number; stackBytes: number; timeoutMs: 500; }>; export class ExpressionSandbox { constructor(limits?: {}); res: { rt: any; ctx: null; handles: never[]; compiled: Map; released: boolean; }; timeoutMs: 500; deadline: number; depth: number; generation: number; owned: any[]; approved: any; evalFuns: any[]; evalFunId: Map; objs: any[]; objId: Map; namespaces: WeakMap; namespaceCache: Map; ctx: any; api: any; /** Releases the QuickJS runtime now (otherwise when the sandbox is collected). */ dispose(): void; guest(name: any, ...args: any[]): any; own(h: any): any; /** A host error as a sandbox error handle (the library throws a handle as is). */ errorHandle(error: any): any; out(v: any): any; /** A host value as a sandbox value (a stand-in for an object). */ toGuest(v: any): any; inn(v: any): any; hostFunctionOf(tag: any): any; object(id: any): any; /** A sandbox function handed to the host: callable while its evaluation runs. */ callback(index: any): (...args: any[]) => any; /** Calls a sandbox function with host arguments, inside the current evaluation. */ call(f: any, args: any): any; /** One evaluation: a deadline, a fresh object table, every handle released at the end. */ scope(run: any, approved: any): any; compile(source: any): any; hostGet(idH: any, kH: any): any; hostSet(idH: any, kH: any, vH: any): any; hostHas(idH: any, kH: any): any; hostDel(idH: any, kH: any): any; hostKeys(idH: any): any; hostCall(fH: any, aH: any): any; hostFormat(kH: any, vH: any, lH: any, oH: any): any; /** Evaluates one expression. Only the names it mentions are passed in; the standard built-ins are the sandbox's own. */ evaluate(expression: any, names: any, values: any, approvedFunctions: any): any; /** Compiles named functions once per source; returns a namespace bound to `approvedFunctions` (callable from the * host; an expression's `fn`). Approved functions are called by name, so one compiled copy serves every engine. */ defineNamespace({ names, source, approvedFunctions, label }: { names: any; source: any; approvedFunctions: any; label: any; }): any; } //# sourceMappingURL=expression-sandbox.d.ts.map