Import
import type { HtmlChunk } from "@typed/template/HtmlChunk";Signatures
export type HtmlChunk = HtmlTextChunk | HtmlPartChunk | HtmlSparsePartChunk;Why
Chunks separate immediately writable author markup from dynamic work, which lets the HTML renderer preserve template order while remaining push-based.
Ownership and lifetime
Chunks are immutable rendering descriptions. The Fx that evaluates them owns subscriptions; the response sink owns emitted strings.
Examples
import type { HtmlChunk } from "@typed/template/HtmlChunk"
import { templateToHtmlChunks } from "@typed/template/HtmlChunk"
import { parse } from "@typed/template/Parser"
const template = parse(["<div>Hello ", "</div>"])
const chunks = templateToHtmlChunks(template)
// chunks will contain:
// - HtmlTextChunk with text "<div>Hello "
// - HtmlPartChunk for the dynamic part
// - HtmlTextChunk with text "</div>"Other public imports
These import paths expose the same declaration. Each page retains its own public name and signature.