UNPKG

tslint-react-hooks

Version:

TSLint rule that enforces the Rules of Hooks

9 lines (8 loc) • 408 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.findAncestorFunction = findAncestorFunction; const function_node_1 = require("./function-node"); const find_closest_ancestor_node_1 = require("./find-closest-ancestor-node"); function findAncestorFunction(node) { return (0, find_closest_ancestor_node_1.findClosestAncestorNode)(node, function_node_1.isFunctionNode); }