function / @typed/template

isAttr

Checks if a rendered node is an Attr node.

Package version
1.0.0-beta.13
Category
Native node recognition
Since
1.0.0

Import

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

Signatures

export declare function isAttr(node: Rendered): node is Attr;

Why

Advanced renderer utilities may handle native attribute nodes explicitly.

Ownership and lifetime

The check borrows the native Attr node and does not attach it to an Element or retain its owner.

Examples

import { isAttr } from "@typed/template/Wire"

const result = isAttr(document.createAttribute("aria-label"))

Other public imports

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

Source