{
  "id": "@typed/ui/HttpRouter#streamingSsrForHttp",
  "canonicalId": "@typed/ui#streamingSsrForHttp",
  "symbol": {
    "id": "@typed/ui/HttpRouter#streamingSsrForHttp",
    "packageName": "@typed/ui",
    "moduleName": "HttpRouter",
    "exportName": "streamingSsrForHttp",
    "kind": "constant",
    "signatures": [
      "export declare const streamingSsrForHttp: {\n    <E, R>(input: Matcher<RenderEvent, E, R>): (router: HttpRouter) => SsrForHttpEffect<E, R>;\n    <E, R>(router: HttpRouter, input: Matcher<RenderEvent, E, R>): SsrForHttpEffect<E, R>;\n};"
    ],
    "summary": "Registers streaming, GET-only HTML routes for a matcher.\n\nPath captures take precedence over same-named query parameters. HTML chunks\nare emitted as they are rendered via `renderToHtml` and `HttpServerResponse.stream`.",
    "sections": {
      "Why": "Streaming lets the server send ordered renderer-owned HTML chunks before the\nwhole 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\nnavigation/router services and stream Scope. Client cancellation interrupts\nrendering and runs finalizers. The stream carries typed renderer failures;\nproducing HTML alone does not attach client hydration behavior."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { streamingSsrForHttp } from \"@typed/ui/HttpRouter\"\nimport { Effect } from \"effect\"\nimport * as HttpRouter from \"effect/unstable/http/HttpRouter\"\nimport { Parse, match } from \"@typed/router\"\nimport { html } from \"@typed/template\"\n\nconst pages = match(Parse(\"/\"), html`<h1>Streamed home</h1>`)\nconst routes = Effect.gen(function* () {\n  const router = yield* HttpRouter.make\n  yield* streamingSsrForHttp(router, pages)\n  return router\n})"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/ui/src/HttpRouter.ts",
      "line": 210
    },
    "since": "1.0.0",
    "category": "Streaming server rendering"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/ui/HttpRouter#streamingSsrForHttp",
    "packageName": "@typed/ui",
    "packageVersion": "1.0.0-beta.7",
    "moduleName": "HttpRouter",
    "consumerSpecifier": "@typed/ui/HttpRouter",
    "exportName": "streamingSsrForHttp",
    "qualifiedName": "streamingSsrForHttp",
    "declarationKey": "declaration:f4eb3800e93574719e1cd6d1",
    "family": "variable",
    "signatures": [
      "export declare const streamingSsrForHttp: {\n    <E, R>(input: Matcher<RenderEvent, E, R>): (router: HttpRouter) => SsrForHttpEffect<E, R>;\n    <E, R>(router: HttpRouter, input: Matcher<RenderEvent, E, R>): SsrForHttpEffect<E, R>;\n};"
    ],
    "sourceSpans": [
      {
        "file": "packages/ui/src/HttpRouter.ts",
        "start": {
          "line": 210,
          "column": 14
        },
        "end": {
          "line": 213,
          "column": 40
        }
      },
      {
        "file": "packages/ui/src/HttpRouter.ts",
        "start": {
          "line": 211,
          "column": 3
        },
        "end": {
          "line": 211,
          "column": 93
        }
      },
      {
        "file": "packages/ui/src/HttpRouter.ts",
        "start": {
          "line": 212,
          "column": 3
        },
        "end": {
          "line": 212,
          "column": 89
        }
      }
    ],
    "aliases": [
      "@typed/ui#streamingSsrForHttp",
      "@typed/ui/index#streamingSsrForHttp"
    ],
    "isAlias": false,
    "static": false
  },
  "declaration": {
    "declarationKey": "declaration:f4eb3800e93574719e1cd6d1",
    "name": "streamingSsrForHttp",
    "family": "variable",
    "facets": [
      {
        "family": "variable",
        "syntaxKind": "VariableDeclaration",
        "signatures": [
          "export declare const streamingSsrForHttp: {\n    <E, R>(input: Matcher<RenderEvent, E, R>): (router: HttpRouter) => SsrForHttpEffect<E, R>;\n    <E, R>(router: HttpRouter, input: Matcher<RenderEvent, E, R>): SsrForHttpEffect<E, R>;\n};"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/ui/src/HttpRouter.ts",
            "start": {
              "line": 210,
              "column": 14
            },
            "end": {
              "line": 213,
              "column": 40
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      },
      {
        "family": "call-signature",
        "syntaxKind": "CallSignature",
        "signatures": [
          "<E, R>(input: Matcher<RenderEvent, E, R>): (router: HttpRouter) => SsrForHttpEffect<E, R>;",
          "<E, R>(router: HttpRouter, input: Matcher<RenderEvent, E, R>): SsrForHttpEffect<E, R>;"
        ],
        "typeParameters": [
          "E",
          "R"
        ],
        "sourceSpans": [
          {
            "file": "packages/ui/src/HttpRouter.ts",
            "start": {
              "line": 211,
              "column": 3
            },
            "end": {
              "line": 211,
              "column": 93
            }
          },
          {
            "file": "packages/ui/src/HttpRouter.ts",
            "start": {
              "line": 212,
              "column": 3
            },
            "end": {
              "line": 212,
              "column": 89
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare const streamingSsrForHttp: {\n    <E, R>(input: Matcher<RenderEvent, E, R>): (router: HttpRouter) => SsrForHttpEffect<E, R>;\n    <E, R>(router: HttpRouter, input: Matcher<RenderEvent, E, R>): SsrForHttpEffect<E, R>;\n};"
    ],
    "typeParameters": [
      "E",
      "R"
    ],
    "summary": "Registers streaming, GET-only HTML routes for a matcher.\n\nPath captures take precedence over same-named query parameters. HTML chunks\nare emitted as they are rendered via `renderToHtml` and `HttpServerResponse.stream`.",
    "sections": {
      "Why": "Streaming lets the server send ordered renderer-owned HTML chunks before the\nwhole 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\nnavigation/router services and stream Scope. Client cancellation interrupts\nrendering and runs finalizers. The stream carries typed renderer failures;\nproducing HTML alone does not attach client hydration behavior."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { streamingSsrForHttp } from \"@typed/ui/HttpRouter\"\nimport { Effect } from \"effect\"\nimport * as HttpRouter from \"effect/unstable/http/HttpRouter\"\nimport { Parse, match } from \"@typed/router\"\nimport { html } from \"@typed/template\"\n\nconst pages = match(Parse(\"/\"), html`<h1>Streamed home</h1>`)\nconst routes = Effect.gen(function* () {\n  const router = yield* HttpRouter.make\n  yield* streamingSsrForHttp(router, pages)\n  return router\n})"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/ui/src/HttpRouter.ts",
        "start": {
          "line": 210,
          "column": 14
        },
        "end": {
          "line": 213,
          "column": 40
        }
      },
      {
        "file": "packages/ui/src/HttpRouter.ts",
        "start": {
          "line": 211,
          "column": 3
        },
        "end": {
          "line": 211,
          "column": 93
        }
      },
      {
        "file": "packages/ui/src/HttpRouter.ts",
        "start": {
          "line": 212,
          "column": 3
        },
        "end": {
          "line": 212,
          "column": 89
        }
      }
    ],
    "since": "1.0.0",
    "category": "Streaming server rendering"
  }
}
