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>): NodePropSourceParameters:
| Parameter | Type | Description |
|---|---|---|
| match | ((type: NodeType) => T | undefined) | NodePropSelectorMap<T> | A mapping from selectors to values, or a function computing values. |
Returns: NodePropSource — A prop source.