interface Props { /** HTTP status to apply to the response. Common values: 404, 410, 451, 503. */ code: number; } /** * Render-time HTTP status declaration. Mount inside a route component (typical * use case: a glob `*` route's NotFound page) when the status is decided by * the rendered tree rather than a loader. * * Writes `code` to the nearest ``'s sink during component * init and renders nothing. With no provider mounted (the standard * client-side case) the component is a silent no-op — same component tree * hydrates without touching the DOM or warning about mismatches. * * Loader-driven errors (`LoaderNotFound` → 404, `LoaderRedirect` → 30x) keep * working as before; this component covers render-time decisions only. * * Last write wins when several `` instances mount in the * same render pass — sink reflects the last component that ran. * * ```svelte * * ``` * * **Streaming SSR ({#await}):** Svelte 5 stable does NOT chunk-stream HTTP * for `{#await}` — the server emits the pending branch and returns the full * response immediately, async resolution happens client-side. So the sink * is always written by the time `await render(App, ...)` resolves, regardless * of where `` is mounted. (This is RSC-like, not React 19 * / Solid streaming.) No ordering concern. * * **Hydration symmetry:** Svelte 5's hydration walker tolerates `{#if}`-branch * asymmetry between server and client (verified by `ssr/` e2e — no warnings * fire when SSR has the wrapper but CSR doesn't). The example's `App.svelte` * uses `{#if httpStatusSink}` so the wrapper is server-only; this is safe in * Svelte but would be a hydration mismatch in Vue/Solid. * * **Valid `code` range:** Node's `res.end()` throws `Invalid status code` on * `NaN`, `0`, negative values, or values `> 999` — this surfaces as a 5xx / * dropped connection, not silent corruption. Pass a real HTTP status integer * (commonly 4xx/5xx; 100-999 is what Node accepts). */ declare const HttpStatusCode: import("svelte").Component; type HttpStatusCode = ReturnType; export default HttpStatusCode;