UNPKG

547 BTypeScriptView Raw
1/**
2 * Copyright (c) 2017, Philip Walton <philip@philipwalton.com>
3 */
4/**
5 * Gets the closest parent element that matches the passed selector.
6 * @param {Element} element The element whose parents to check.
7 * @param {string} selector The CSS selector to match against.
8 * @param {boolean=} shouldCheckSelf True if the selector should test against
9 * the passed element itself.
10 * @return {Element|undefined} The matching element or undefined.
11 */
12export declare function closest(element: any, selector: any, shouldCheckSelf?: boolean): any;