export interface RenderRootState { nodeCounter: number; parentContextStack: number[]; renderingContext: { fast: unknown; root: unknown; }; } /** Fresh, fully-isolated state for one render root (counter at 0, empty stack, * no ambient rendering context — identical to a cold module load). */ export declare function createRenderRootState(): RenderRootState; /** * Run `fn` with `state` swapped into the module globals, restoring the previous * (outer) globals on exit — including on throw. SYNCHRONOUS ONLY: `fn` must do * all node-minting synchronously before returning (no `await` inside the swapped * window). See non-goals. */ export declare function withRenderRoot(state: RenderRootState, fn: () => T): T;