Returns whether any of the ancestors of the given node fulfills the given condition.
If the given condition is an AST node instead of a function, hasSomeAncestor will behave as if the condition function was d => d === conditionNode.
hasSomeAncestor
d => d === conditionNode
The ancestors will be iterated in the order from closest to farthest. The condition function will not be called on the given node.
Returns whether any of the ancestors of the given node fulfills the given condition.
If the given condition is an AST node instead of a function,
hasSomeAncestor
will behave as if the condition function wasd => d === conditionNode
.The ancestors will be iterated in the order from closest to farthest. The condition function will not be called on the given node.