function / @typed/template/Wire

isText

Checks if a rendered node is a Text node.

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

Import

import { isText } from "@typed/template/Wire";

Signatures

export declare function isText(node: Rendered): node is Text;

Why

Text serialization and direct text updates use the native node kind.

Ownership and lifetime

The check borrows the native Text node and does not mutate or retain its character data.

Examples

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

const result = isText(document.createTextNode("hello"))

Other public imports

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

Source