Skip to content

@serenity-is/domwise / JSXElement

Type Alias: JSXElement

JSXElement = HTMLElement | ConfigureElement["svg"] extends false ? never : SVGElement | ConfigureElement["mathml"] extends false ? never : MathMLElement

Defined in: types/jsx-namespace.d.ts:13

The DOM node type returned by JSX expressions.

Union of HTMLElement plus SVGElement/MathMLElement when those namespaces are enabled in JSX.ConfigureElement. Technically this could also include DocumentFragment, but many DOM APIs expect Element, so fragments are typed separately where needed.