UNPKG

879 BTypeScriptView Raw
1import { Options as CSSSelectOptions } from "css-select";
2import type { Element, Node, Document } from "domhandler";
3export { filters, pseudos, aliases } from "css-select";
4export interface Options extends CSSSelectOptions<Node, Element> {
5 /** Optional reference to the root of the document. If not set, this will be computed when needed. */
6 root?: Document;
7}
8export declare function is(element: Element, selector: string | ((el: Element) => boolean), options?: Options): boolean;
9export declare function some(elements: Element[], selector: string | ((el: Element) => boolean), options?: Options): boolean;
10export declare function filter(selector: string, elements: Node[], options?: Options): Element[];
11export declare function select(selector: string | ((el: Element) => boolean), root: Node | Node[], options?: Options): Element[];
12//# sourceMappingURL=index.d.ts.map
\No newline at end of file