import type { JsRuntime } from "./runtime.ts"; import type { RuntimeContentItem } from "../code-mode/types.ts"; import type { JsInput, JsOutcome, JsSnapshot } from "./protocol.ts"; interface Callbacks { output(items: RuntimeContentItem[]): void; notify(text: string): void; yield(): void; request(id: number, name: string, value: unknown): Promise; } /** A compiled WASM module is shared; each kernel owns a separate VM and thread. */ export declare class JsKernel { private readonly worker; private readonly interrupt; private next; private active; private failure; private stopping; static create(runtime: JsRuntime, heapBytes: number, snapshot?: JsSnapshot, managementClone?: boolean): Promise; private constructor(); execute(input: JsInput, callbacks: Callbacks): Promise; stop(): Promise; private fail; private request; } export {};