Skip to content

NodeOf type

Home > @rimitive/view > NodeOf

Union of all node types in the config. Used for adapter method parameters where any node type is accepted.

Signature:

export type NodeOf<TConfig extends TreeConfig> = TConfig['nodes'][keyof TConfig['nodes']];

References: TreeConfig

type AnyDOMNode = NodeOf<DOMTreeConfig>; // HTMLDivElement | HTMLSpanElement | ... | Text