class / @typed/template

ClassNamePartNode

Represents a dynamic class name part (e.g. class="${classes}").

Package version
1.0.0-beta.13
Category
Class contributions
Since
1.0.0

Import

import { ClassNamePartNode } from "@typed/template";

Signatures

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

Why

Class collections have dedicated normalization while preserving unrelated classes owned by external code.

Ownership and lifetime

The part owns only an index; the mounted part owns its local class contribution.

Constructor

Creates dynamic class syntax.

Property: _tag

Dynamic-class discriminant.

Property: _tag: Why

Selects class normalization without replacing external classes.

Property: _tag: Ownership and lifetime

Immutable AST metadata.

Property: index

Interpolation index producing class values.

Property: index: Why

Locates the producer for one retained class contribution.

Property: index: Ownership and lifetime

Immutable scalar metadata; the render Scope owns the producer.

Examples

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

const part = new ClassNamePartNode(0)

Other public imports

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

Source