Skip to main content
Version: 19.4.0

NodeFor type

Signature:

export declare type NodeFor<ComplexSelector extends string> =
TypeSelectorOfComplexSelector<ComplexSelector> extends infer TypeSelector
? TypeSelector extends keyof HTMLElementTagNameMap
? HTMLElementTagNameMap[TypeSelector]
: TypeSelector extends keyof SVGElementTagNameMap
? SVGElementTagNameMap[TypeSelector]
: Element
: never;