public_library_map/node_modules/cheerio-select/lib/index.d.ts

12 lines
915 B
TypeScript
Raw Normal View History

2022-09-03 17:12:22 +10:00
import { type Options as CSSSelectOptions } from "css-select";
import type { Element, AnyNode, Document } from "domhandler";
2021-11-24 19:46:47 +11:00
export { filters, pseudos, aliases } from "css-select";
2022-09-03 17:12:22 +10:00
export interface Options extends CSSSelectOptions<AnyNode, Element> {
2021-11-24 19:46:47 +11:00
/** Optional reference to the root of the document. If not set, this will be computed when needed. */
root?: Document;
}
export declare function is(element: Element, selector: string | ((el: Element) => boolean), options?: Options): boolean;
export declare function some(elements: Element[], selector: string | ((el: Element) => boolean), options?: Options): boolean;
2022-09-03 17:12:22 +10:00
export declare function filter(selector: string, elements: AnyNode[], options?: Options): Element[];
export declare function select(selector: string | ((el: Element) => boolean), root: AnyNode | AnyNode[], options?: Options, limit?: number): Element[];
2021-11-24 19:46:47 +11:00
//# sourceMappingURL=index.d.ts.map