/** * Find closest element ancestor start from the given node which matches the given selector * @param node Find ancestor start from this node * @param root Root node where the search should stop at. The return value can never be this node * @param selector The expected selector. If null, return the first HTML Element found from start node * @returns An HTML element which matches the given selector. If the given start node matches the selector, * returns the given node */ export default function findClosestElementAncestor(node: Node | null, root?: Node, selector?: string): HTMLElement | null;