type-alias / @typed/template/Template

SparsePartNode

Represents a “sparse” part, which is a text or attribute value composed of mix of static text and dynamic parts (e.g. id="prefix-${id}").

Package version
1.0.0-beta.7
Category
Sparse expressions
Since
1.0.0

Import

import type { SparsePartNode } from "@typed/template/Template";

Signatures

export type SparsePartNode = SparseAttrNode | SparseClassNameNode | SparseCommentNode | SparseTextNode;

Why

Sparse syntax preserves literal segments while still giving every dynamic value context-specific update and escaping semantics.

Ownership and lifetime

The AST values own no reactive producer; render Scopes own evaluation.

Examples

import { SparseTextNode, type SparsePartNode } from "@typed/template/Template"

const part: SparsePartNode = new SparseTextNode([])

Other public imports

These import paths expose the same declaration. Each page retains its own public name and signature.

Source