type-alias / @typed/template

Attribute

Represents every static or dynamic attribute-like AST node.

Package version
1.0.0-beta.7
Category
Attribute syntax
Since
1.0.0

Import

import type { Attribute } from "@typed/template";

Signatures

export type Attribute = AttributeNode | AttrPartNode | SparseAttrNode | BooleanNode | BooleanPartNode | ClassNamePartNode | SparseClassNameNode | DataPartNode | EventPartNode | PropertyPartNode | PropertiesPartNode | RefPartNode;

Why

Attribute, property, event, ref, class, data, boolean, and spread semantics remain distinct for native DOM updates and safe SSR serialization.

Ownership and lifetime

The union owns no Attr, listener, ref target, or Scope.

Examples

import { AttributeNode, type Attribute } from "@typed/template/Template"

const attribute: Attribute = new AttributeNode("aria-label", "Close")

Other public imports

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

Source