{
  "id": "@typed/template#templateToHtmlChunks",
  "canonicalId": "@typed/template#templateToHtmlChunks",
  "symbol": {
    "id": "@typed/template#templateToHtmlChunks",
    "packageName": "@typed/template",
    "moduleName": ".",
    "exportName": "templateToHtmlChunks",
    "kind": "function",
    "signatures": [
      "export declare function templateToHtmlChunks({ nodes }: Template.Template): readonly HtmlChunk[];"
    ],
    "summary": "Converts a parsed `Template` into a sequence of `HtmlChunk`s.\nThis optimization pre-calculates the static HTML strings to minimize work at render time.",
    "sections": {
      "Why": "Compiling the parsed AST once exposes static output immediately and assigns a\ncontext-specific serializer to each dynamic part.",
      "Ownership and lifetime": "The returned chunks retain the parsed nodes but own no reactive input. A\n`RenderTemplate` layer may cache them by template-literal identity.",
      "Trust boundary": "Dynamic serializers escape data for node, attribute, comment, and text-only\ncontexts; renderer-owned HTML transport remains a separate brand."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { templateToHtmlChunks } from \"@typed/template/HtmlChunk\"\nimport { parse } from \"@typed/template/Parser\"\n\nconst template = parse([\"<div class=\\\"container\\\">Hello \", \"</div>\"])\nconst chunks = templateToHtmlChunks(template)\n\n// chunks is an array of HtmlChunk objects\n// Static parts are pre-rendered as text chunks\n// Dynamic parts are represented as part chunks"
      }
    ],
    "relations": [],
    "source": {
      "file": "packages/template/src/HtmlChunk.ts",
      "line": 386
    },
    "since": "1.0.0",
    "category": "HTML compilation"
  },
  "exposure": {
    "recordKind": "declaration",
    "id": "@typed/template#templateToHtmlChunks",
    "packageName": "@typed/template",
    "packageVersion": "1.0.0-beta.13",
    "moduleName": ".",
    "consumerSpecifier": "@typed/template",
    "exportName": "templateToHtmlChunks",
    "qualifiedName": "templateToHtmlChunks",
    "declarationKey": "declaration:cea72b7e3089c74bd7adba22",
    "family": "function",
    "signatures": [
      "export declare function templateToHtmlChunks({ nodes }: Template.Template): readonly HtmlChunk[];"
    ],
    "sourceSpans": [
      {
        "file": "packages/template/src/HtmlChunk.ts",
        "start": {
          "line": 386,
          "column": 1
        },
        "end": {
          "line": 390,
          "column": 2
        }
      }
    ],
    "aliases": [
      "@typed/template/HtmlChunk#templateToHtmlChunks"
    ],
    "isAlias": false,
    "static": false
  },
  "declaration": {
    "declarationKey": "declaration:cea72b7e3089c74bd7adba22",
    "name": "templateToHtmlChunks",
    "family": "function",
    "facets": [
      {
        "family": "function",
        "syntaxKind": "FunctionDeclaration",
        "signatures": [
          "export declare function templateToHtmlChunks({ nodes }: Template.Template): readonly HtmlChunk[];"
        ],
        "typeParameters": [],
        "sourceSpans": [
          {
            "file": "packages/template/src/HtmlChunk.ts",
            "start": {
              "line": 386,
              "column": 1
            },
            "end": {
              "line": 390,
              "column": 2
            }
          }
        ],
        "static": false,
        "readonly": false,
        "optional": false
      }
    ],
    "signatures": [
      "export declare function templateToHtmlChunks({ nodes }: Template.Template): readonly HtmlChunk[];"
    ],
    "typeParameters": [],
    "summary": "Converts a parsed `Template` into a sequence of `HtmlChunk`s.\nThis optimization pre-calculates the static HTML strings to minimize work at render time.",
    "sections": {
      "Why": "Compiling the parsed AST once exposes static output immediately and assigns a\ncontext-specific serializer to each dynamic part.",
      "Ownership and lifetime": "The returned chunks retain the parsed nodes but own no reactive input. A\n`RenderTemplate` layer may cache them by template-literal identity.",
      "Trust boundary": "Dynamic serializers escape data for node, attribute, comment, and text-only\ncontexts; renderer-owned HTML transport remains a separate brand."
    },
    "examples": [
      {
        "language": "ts",
        "code": "import { templateToHtmlChunks } from \"@typed/template/HtmlChunk\"\nimport { parse } from \"@typed/template/Parser\"\n\nconst template = parse([\"<div class=\\\"container\\\">Hello \", \"</div>\"])\nconst chunks = templateToHtmlChunks(template)\n\n// chunks is an array of HtmlChunk objects\n// Static parts are pre-rendered as text chunks\n// Dynamic parts are represented as part chunks"
      }
    ],
    "sourceSpans": [
      {
        "file": "packages/template/src/HtmlChunk.ts",
        "start": {
          "line": 386,
          "column": 1
        },
        "end": {
          "line": 390,
          "column": 2
        }
      }
    ],
    "since": "1.0.0",
    "category": "HTML compilation"
  }
}
