import { type ReactNode } from '../core'; import { type ContextSnapshot } from './dispatcher'; export interface SuspendedBoundary { id: number; fallbackHTML: string; children: ReactNode; thenable: Promise; contextSnapshot: ContextSnapshot; } export interface WalkOptions { emit: (chunk: string) => void; onSuspend?: ((boundary: SuspendedBoundary) => void) | undefined; nextBoundaryId: () => number; bootstrapped?: boolean | undefined; isBoundaryResolution?: boolean | undefined; isSvg?: boolean | undefined; /** * Tracks whether the most recent emission within the *current text flow* * ended with a text node. When the next emission is also text, we emit a * `` separator so the browser's HTML parser doesn't merge them * into a single text node — required for hydration to line up text * boundaries with the React tree. Reset to `false` whenever we enter a * new host element (`` opens a fresh text flow). */ textState?: { lastWasText: boolean; }; } /** * Synchronously walk a React node and emit HTML string pieces to `opts.emit`. * Suspended boundaries are emitted as fallbacks with marker IDs; if `opts.onSuspend` * is provided, the suspension is recorded for later streaming. */ export declare function walk(node: ReactNode, opts: WalkOptions): void;