Module / v1.0.0-beta.13

@typed/template/HtmlChunk

8 unique exports available through this public import path, including their members and aliases.

import * as HtmlChunk from "@typed/template/HtmlChunk";

Dynamic HTML chunks

  • HtmlPartChunk

    interface

    A chunk representing a dynamic part (interpolation).

HTML chunk assembly

  • HtmlChunksBuilder

    class

    Advanced mutable builder used by the published template-to-chunk compiler.

HTML chunk protocol

  • HtmlChunk

    type-alias

    Represents a piece of a pre-compiled HTML template.

    Chunks allow the renderer to stream static parts of the HTML immediately while waiting for dynamic parts to be resolved.

HTML compilation

  • templateToHtmlChunks

    function

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

Hydration markers

  • addTemplateHash

    function

    Wraps the HTML chunks with comments containing the template hash. This is crucial for hydration to identify which template rendered a section of HTML.

Sparse HTML chunks

Spread serialization

Static HTML chunks