UNPKG

915 BTypeScriptView Raw
1import { type Options as CSSSelectOptions } from "css-select";
2import type { Element, AnyNode, Document } from "domhandler";
3export { filters, pseudos, aliases } from "css-select";
4export interface Options extends CSSSelectOptions<AnyNode, 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: AnyNode[], options?: Options): Element[];
11export declare function select(selector: string | ((el: Element) => boolean), root: AnyNode | AnyNode[], options?: Options, limit?: number): Element[];
12//# sourceMappingURL=index.d.ts.map
\No newline at end of file