{
  "id": "@typed/template#RenderTemplate",
  "canonicalId": "@typed/template#RenderTemplate",
  "symbol": {
    "id": "@typed/template#RenderTemplate",
    "packageName": "@typed/template",
    "moduleName": ".",
    "exportName": "RenderTemplate",
    "kind": "class",
    "signatures": [
      "export declare class RenderTemplate extends RenderTemplate_base {\n}"
    ],
    "summary": "A service that defines how templates are rendered.\n\nDifferent implementations can be provided for different environments (e.g., `DomRenderTemplate` for browsers,\n`HtmlRenderTemplate` for SSR).",
    "sections": {
      "Why": "A normal Effect service separates template syntax from output medium. The\nsame `html` value can produce concrete DOM, streamed HTML, or hydration while\nretaining its `E` and `R` channels.",
      "Ownership and lifetime": "A provided implementation may own caches for its Layer lifetime. Each Fx it\nreturns is acquired and finalized by the Scope that runs it; the service tag\nitself owns no DOM or response stream."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect, Layer } from \"effect\"\nimport { html } from \"@typed/template\"\nimport { DomRenderTemplate, render } from \"@typed/template/Render\"\nimport { HtmlRenderTemplate, renderToHtmlString } from \"@typed/template/Html\"\nimport { Fx } from \"@typed/fx\"\n\n// Run DOM rendering until the surrounding Effect is interrupted.\nconst browserApp = render(html`<div>Hello</div>`, document.body).pipe(\n  Fx.drainLayer,\n  Layer.provide(DomRenderTemplate),\n  Layer.launch\n)\n\n// Use HTML rendering for SSR\nconst serverApp = Effect.scoped(Effect.gen(function* () {\n  const template = html`<div>Hello</div>`\n  const htmlString = yield* renderToHtmlString(template).pipe(\n    Effect.provide(HtmlRenderTemplate)\n  )\n  console.log(htmlString) // \"<div>Hello</div>\"\n}))"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/template/src/RenderTemplate.ts",
      "line": 58
    },
    "since": "1.0.0",
    "category": "Template interpretation"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/template#RenderTemplate",
    "packageName": "@typed/template",
    "packageVersion": "1.0.0-beta.7",
    "moduleName": ".",
    "consumerSpecifier": "@typed/template",
    "exportName": "RenderTemplate",
    "qualifiedName": "RenderTemplate",
    "declarationKey": "declaration:c748cdf8c1ce76e526480d19",
    "family": "class",
    "signatures": [
      "export declare class RenderTemplate extends RenderTemplate_base {\n}"
    ],
    "sourceSpans": [
      {
        "file": "packages/template/src/RenderTemplate.ts",
        "start": {
          "line": 58,
          "column": 1
        },
        "end": {
          "line": 70,
          "column": 25
        }
      }
    ],
    "aliases": [
      "@typed/template/RenderTemplate#RenderTemplate"
    ],
    "isAlias": false,
    "static": false
  },
  "declaration": {
    "declarationKey": "declaration:c748cdf8c1ce76e526480d19",
    "name": "RenderTemplate",
    "family": "class",
    "facets": [
      {
        "family": "class",
        "syntaxKind": "ClassDeclaration",
        "signatures": [
          "export declare class RenderTemplate extends RenderTemplate_base {\n}"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/template/src/RenderTemplate.ts",
            "start": {
              "line": 58,
              "column": 1
            },
            "end": {
              "line": 70,
              "column": 25
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare class RenderTemplate extends RenderTemplate_base {\n}"
    ],
    "typeParameters": [],
    "summary": "A service that defines how templates are rendered.\n\nDifferent implementations can be provided for different environments (e.g., `DomRenderTemplate` for browsers,\n`HtmlRenderTemplate` for SSR).",
    "sections": {
      "Why": "A normal Effect service separates template syntax from output medium. The\nsame `html` value can produce concrete DOM, streamed HTML, or hydration while\nretaining its `E` and `R` channels.",
      "Ownership and lifetime": "A provided implementation may own caches for its Layer lifetime. Each Fx it\nreturns is acquired and finalized by the Scope that runs it; the service tag\nitself owns no DOM or response stream."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { Effect, Layer } from \"effect\"\nimport { html } from \"@typed/template\"\nimport { DomRenderTemplate, render } from \"@typed/template/Render\"\nimport { HtmlRenderTemplate, renderToHtmlString } from \"@typed/template/Html\"\nimport { Fx } from \"@typed/fx\"\n\n// Run DOM rendering until the surrounding Effect is interrupted.\nconst browserApp = render(html`<div>Hello</div>`, document.body).pipe(\n  Fx.drainLayer,\n  Layer.provide(DomRenderTemplate),\n  Layer.launch\n)\n\n// Use HTML rendering for SSR\nconst serverApp = Effect.scoped(Effect.gen(function* () {\n  const template = html`<div>Hello</div>`\n  const htmlString = yield* renderToHtmlString(template).pipe(\n    Effect.provide(HtmlRenderTemplate)\n  )\n  console.log(htmlString) // \"<div>Hello</div>\"\n}))"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/template/src/RenderTemplate.ts",
        "start": {
          "line": 58,
          "column": 1
        },
        "end": {
          "line": 70,
          "column": 25
        }
      }
    ],
    "since": "1.0.0",
    "category": "Template interpretation"
  }
}
