import { Budget } from "../interp/budget.js"; import { Scope } from "../interp/interpreter.js"; import { type SandboxValue } from "../interp/values.js"; import { type Module, type ParseResult } from "../parse/parser.js"; import { type ModuleRegistry } from "../modules/registry.js"; import type { RuntimeCallFrame, RuntimePendingPromise, RuntimeScopeFrame, SerializedSnapshot } from "./serialize.js"; export type RestoreOptions = { source: string; modules?: ModuleRegistry; budget?: Budget; signal?: AbortSignal; }; export type RestoredCallFrame = RuntimeCallFrame & { awaitingPromise?: RuntimePendingPromise; node: ParseResult; scope: Scope; }; export type RestoredScopeFrame = RuntimeScopeFrame & { scope: Scope; }; export type RestoredSnapshot = { ast: Module; budget: Budget; callStack: RestoredCallFrame[]; currentAstNodeId: number; currentNode: ParseResult; currentScope: Scope; moduleBindings: Record; pendingPromises: RuntimePendingPromise[]; scopeChain: RestoredScopeFrame[]; signal?: AbortSignal; sourceHash: string; }; export declare function restore(snapshot: SerializedSnapshot, options: RestoreOptions): RestoredSnapshot;