# HtmlPartChunk

A chunk representing a dynamic part (interpolation).

## Signatures

```ts
export interface HtmlPartChunk {
    readonly _tag: "part";
    readonly node: Template.PartNode;
    readonly render: (value: unknown) => string;
}
```

## Why

The parsed part and its context-aware serializer stay together, avoiding a
generic raw-HTML interpolation path.

## Ownership and lifetime

The record borrows the parsed node and pure serializer; evaluation belongs to
the HTML-rendering Fx.

## Property: _tag

Identifies a single dynamic part chunk.

## Property: _tag: Why

Enables exhaustive renderer dispatch.

## Property: _tag: Ownership and lifetime

Immutable metadata owned by the chunk.

## Property: node

The parsed dynamic part whose index selects the input value.

## Property: node: Why

Preserves the exact HTML context for serialization.

## Property: node: Ownership and lifetime

The chunk borrows the immutable AST node.

## Property: render

Function to render the value of this part into a string.

## Property: render: Why

Each part keeps its context-specific escaping function.

## Property: render: Ownership and lifetime

The pure function retains no application value between calls.

## Examples

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

const chunk = templateToHtmlChunks(parse(["<p>", "</p>"]))[1] as HtmlPartChunk
```
