import type { QuickJS } from "quickjs-wasi"; import { type PortableState } from "../ts-mode/portable-state.ts"; import type { JsInventory } from "./protocol.ts"; import type { JsSupport } from "./support.ts"; import type { JsBindings } from "./managed-bindings.ts"; /** The data graph format/merge is shared, never the TS runtime or its state files. */ export declare function assertJsData(value: unknown): asserts value is PortableState; export declare function captureJsData(vm: QuickJS, support: JsSupport, inventory: JsInventory, names: readonly string[], bindings: JsBindings): PortableState; /** Call in a disposable full-VM candidate. Failure must not publish partial declarations. */ export declare function restoreJsData(vm: QuickJS, support: JsSupport, inventory: JsInventory, state: PortableState, bindings: JsBindings): void; export interface JsReleaseResult { released: string[]; legacyRetained: string[]; skipped: { name: string; reason: string; }[]; } /** Drop registry roots, never rebuild closures from recipes. */ export declare function releaseJsData(vm: QuickJS, inventory: JsInventory, names: readonly string[], protectedNames: ReadonlyMap, bindings: JsBindings): JsReleaseResult;