/** * Async / streaming render entry points. * * Builds on top of the synchronous `renderToString()` and adds: * - `renderToStringAsync()` — awaits Promise/`defer()` values in the context. * - `renderToStream()` — emits the HTML as a Web `ReadableStream`. * - `renderToResponse()` — wraps the stream in a `Response` with sensible * defaults (`Content-Type`, `Cache-Control`, ETag, head injection, store * state injection). * * All three run on Bun, Deno and Node ≥ 24 without external dependencies. * * @module bquery/ssr */ import type { BindingContext } from '../view/types'; import { type SSRContext } from './context'; import type { RenderOptions, SSRResult } from './types'; /** * Options accepted by the async render APIs. Extends the base `RenderOptions` * with response-shaping switches. */ export interface AsyncRenderOptions extends RenderOptions { /** Pre-built SSR context. Created automatically if omitted. */ context?: SSRContext; /** * Whether to inject the head manager output, asset manifest and store-state * `