aboutsummaryrefslogtreecommitdiff
path: root/node_modules/cheerio/lib/types.d.ts
blob: d590e7cbc078d42c38db657ebc786d0efdafce6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
declare type LowercaseLetters = 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'o' | 'p' | 'q' | 'r' | 's' | 't' | 'u' | 'v' | 'w' | 'x' | 'y' | 'z';
declare type AlphaNumeric = LowercaseLetters | Uppercase<LowercaseLetters> | `${number}`;
declare type SelectorSpecial = '.' | '#' | ':' | '|' | '>' | '+' | '~' | '[';
/**
 * Type for identifying selectors. Allows us to "upgrade" queries using
 * selectors to return `Element`s.
 */
export declare type SelectorType = `${SelectorSpecial}${AlphaNumeric}${string}` | `${AlphaNumeric}${string}`;
import type { Cheerio } from './cheerio';
import type { Node } from 'domhandler';
/** Elements that can be passed to manipulation methods. */
export declare type BasicAcceptedElems<T extends Node> = Cheerio<T> | T[] | T | string;
/** Elements that can be passed to manipulation methods, including functions. */
export declare type AcceptedElems<T extends Node> = BasicAcceptedElems<T> | ((this: T, i: number, el: T) => BasicAcceptedElems<T>);
/** Function signature, for traversal methods. */
export declare type FilterFunction<T> = (this: T, i: number, el: T) => boolean;
/** Supported filter types, for traversal methods. */
export declare type AcceptedFilters<T> = string | FilterFunction<T> | T | Cheerio<T>;
export {};
//# sourceMappingURL=types.d.ts.map