Skip to content

Function: isHTMLElement()

ts
function isHTMLElement(value: unknown): value is HTMLElement;

Type guard that checks if a value is an HTMLElement. Safe to use in SSR environments.

Parameters

ParameterTypeDescription
valueunknownThe value to check

Returns

value is HTMLElement

True if the value is an HTMLElement