# templateToHtmlChunks

Converts a parsed `Template` into a sequence of `HtmlChunk`s.
This optimization pre-calculates the static HTML strings to minimize work at render time.

## Signatures

```ts
export declare function templateToHtmlChunks({ nodes }: Template.Template): readonly HtmlChunk[];
```

## Why

Compiling the parsed AST once exposes static output immediately and assigns a
context-specific serializer to each dynamic part.

## Ownership and lifetime

The returned chunks retain the parsed nodes but own no reactive input. A
`RenderTemplate` layer may cache them by template-literal identity.

## Trust boundary

Dynamic serializers escape data for node, attribute, comment, and text-only
contexts; renderer-owned HTML transport remains a separate brand.

## Examples

```ts
import { templateToHtmlChunks } from "@typed/template/HtmlChunk"
import { parse } from "@typed/template/Parser"

const template = parse(["<div class=\"container\">Hello ", "</div>"])
const chunks = templateToHtmlChunks(template)

// chunks is an array of HtmlChunk objects
// Static parts are pre-rendered as text chunks
// Dynamic parts are represented as part chunks
```
