//#region src/hydrate/claim.d.ts interface MismatchInfo { expected: string; found: Node | null; } type OnMismatch = (info: MismatchInfo) => void; //#endregion //#region src/hydrate/index.d.ts interface HydrateOptions { /** * Called when the server DOM does not match the component tree. The * mismatched subtree is discarded and rendered fresh; the caller owns * logging/reporting. */ onMismatch?: OnMismatch; } interface HydrateResult { /** Tear down every effect, handler and live binding wired by hydration. */ dispose: () => void; } /** * Make server-rendered HTML interactive by re-executing the component tree * in claim mode: existing DOM nodes are adopted instead of rebuilt, `on:` * handlers attach to the claimed nodes, and dynamic children bind live to * the server-emitted slot markers. * * The component code runs once on the client (closures are recreated by * re-execution — no serialized handlers). Async children keep their * server-rendered content visible until the client-side value settles. * * Server/client trees must match; on mismatch the affected subtree is * rendered fresh and `options.onMismatch` is invoked. * * @example * ```tsx * const { dispose } = hydrate(document.getElementById("app")!, () => ); * ``` */ declare function hydrate(container: Element, app: () => unknown, options?: HydrateOptions): HydrateResult; //#endregion export { HydrateOptions, HydrateResult, type MismatchInfo, type OnMismatch, hydrate };