Import
import { streamingSsrForHttp } from "@typed/ui/index";Signatures
export declare const streamingSsrForHttp: {
<E, R>(input: Matcher<RenderEvent, E, R>): (router: HttpRouter) => SsrForHttpEffect<E, R>;
<E, R>(router: HttpRouter, input: Matcher<RenderEvent, E, R>): SsrForHttpEffect<E, R>;
};Why
Streaming lets the server send ordered renderer-owned HTML chunks before the whole page completes while preserving the same Typed matcher and Effect HTTP model.
Ownership and lifetime
Registration adds GET routes to the supplied router. Each request owns its navigation/router services and stream Scope. Client cancellation interrupts rendering and runs finalizers. The stream carries typed renderer failures; producing HTML alone does not attach client hydration behavior.
Examples
import { streamingSsrForHttp } from "@typed/ui/HttpRouter"
import { Effect } from "effect"
import * as HttpRouter from "effect/unstable/http/HttpRouter"
import { Parse, match } from "@typed/router"
import { html } from "@typed/template"
const pages = match(Parse("/"), html`<h1>Streamed home</h1>`)
const routes = Effect.gen(function* () {
const router = yield* HttpRouter.make
yield* streamingSsrForHttp(router, pages)
return router
})Other public imports
These import paths expose the same declaration. Each page retains its own public name and signature.