Skip to content

NodeProp.add method

NodeProp › add

Unofficial

Create a prop source that adds this prop to matching node types.

Signature:

add(match: ((type: NodeType) => T | undefined) | NodePropSelectorMap<T>): NodePropSource

Parameters:

Parameter Type Description
match ((type: NodeType) => T | undefined) | NodePropSelectorMap<T> A mapping from selectors to values, or a function computing values.

Returns: NodePropSourceA prop source.