export declare class MontyUnavailableError extends Error { constructor(message: string, options?: { cause?: unknown; }); } export interface MontySessionLike { readonly workerPid?: number; feedRun(code: string, options?: Record): Promise; close(): Promise; } export interface MontyPoolLike { checkout(options?: Record): Promise; close(): Promise; } /** * The two door pieces `MirageOSAccess` needs from the binding: the * decline sentinel, and the handle class an `open` answer must be an * instance of (the binding wraps it into the guest's `_io.*` object). */ export interface MontyBindingBits { NOT_HANDLED: symbol; MontyFileHandle: new (path: string, mode: string) => unknown; } /** A worker-death error, the one shape run() maps to an exit code. */ export interface MontyCrashedLike extends Error { timedOut: boolean; } export interface MontyModuleLike extends MontyBindingBits { Monty: { create(options?: Record): Promise; }; MontySyntaxError: new (...args: never[]) => Error; MontyRuntimeError: new (...args: never[]) => Error; MontyCrashedError: new (...args: never[]) => MontyCrashedLike; } export interface MontyDisplayableError extends Error { display?: (format?: string) => string; } /** Import the optional binding, failing loud when it is absent. */ export declare function loadMontyModule(): Promise; //# sourceMappingURL=binding.d.ts.map