1 |
|
2 | 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';
|
3 | type AlphaNumeric = LowercaseLetters | Uppercase<LowercaseLetters> | `${number}`;
|
4 | type SelectorSpecial = '.' | '#' | ':' | '|' | '>' | '+' | '~' | '[';
|
5 |
|
6 |
|
7 |
|
8 |
|
9 | export type SelectorType = `${SelectorSpecial}${AlphaNumeric}${string}` | `${AlphaNumeric}${string}`;
|
10 | import type { Cheerio } from './cheerio.js';
|
11 | import type { AnyNode } from 'domhandler';
|
12 |
|
13 | export type BasicAcceptedElems<T extends AnyNode> = ArrayLike<T> | T | string;
|
14 |
|
15 | export type AcceptedElems<T extends AnyNode> = BasicAcceptedElems<T> | ((this: T, i: number, el: T) => BasicAcceptedElems<T>);
|
16 | /** Function signature, for traversal methods. */
|
17 | export type FilterFunction<T> = (this: T, i: number, el: T) => boolean;
|
18 |
|
19 | export type AcceptedFilters<T> = string | FilterFunction<T> | T | Cheerio<T>;
|
20 | export {};
|
21 |
|
\ | No newline at end of file |