class / @typed/template/Template

TextPartNode

Represents a dynamic text part (e.g. ${text}).

Package version
1.0.0-beta.13
Category
Text bindings
Since
1.0.0

Import

import { TextPartNode } from "@typed/template/Template";

Signatures

export declare class TextPartNode {
    readonly _tag: "text-part";
    readonly index: number;
    constructor(index: number);
}

Why

A retained native text target supports O(1) scalar updates with respect to the surrounding DOM tree.

Ownership and lifetime

The AST owns only an index; the mounted render Scope owns the text updater.

Constructor

Creates dynamic text syntax.

Property: _tag

Dynamic-text discriminant.

Property: _tag: Why

Selects a retained native Text target for O(1) scalar updates.

Property: _tag: Ownership and lifetime

Immutable AST metadata.

Property: index

Interpolation index driving the retained text target.

Property: index: Why

Locates the producer without walking the surrounding tree.

Property: index: Ownership and lifetime

Immutable scalar metadata; the render Scope owns the producer.

Examples

import { TextPartNode } from "@typed/template/Template"

const part = new TextPartNode(0)

Other public imports

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

Source