function / @typed/template

isElement

Checks if a rendered node is an Element.

Package version
1.0.0-beta.7
Category
Native element recognition
Since
1.0.0

Import

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

Signatures

export declare function isElement(node: Rendered): node is Element;

Why

Element-only operations remain expressed through native DOM types.

Ownership and lifetime

The check borrows the candidate for a native element-kind test and does not claim or retain the Element.

Examples

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

const result = isElement(document.createElement("div"))

Other public imports

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

Source