type-alias / @typed/template/Template

Text

Represents static, dynamic, or sparse text content.

Package version
1.0.0-beta.7
Category
Text content
Since
1.0.0

Import

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

Signatures

export type Text = TextNode | TextPartNode | SparseTextNode;

Why

Text-only element contexts need a dedicated union for correct escaping and closing-tag neutralization.

Ownership and lifetime

The alias describes AST data and owns no native Text node.

Examples

import { TextNode, type Text } from "@typed/template/Template"

const text: Text = new TextNode("hello")

Other public imports

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

Source