Const
Finds the first node of a given type or name in the current selection.
The editor state.
The node type or name.
The position to start searching from.
Optional
The maximum depth to search.
The node and the depth as an array.
Finds the first node of a given type or name in the current selection.