-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.d.ts
More file actions
49 lines (41 loc) · 1.19 KB
/
index.d.ts
File metadata and controls
49 lines (41 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/* auto-generated by NAPI-RS */
/* eslint-disable */
export declare class HTMLElement {
outerHTML: string
get innerHTML(): string
get text(): string
get id(): string | null
get tagName(): string
getAttribute(name: string): string | null
get attributes(): Record<string, string>
get className(): string
get classList(): Array<string>
selectFirst(options: SelectFirstOptions): HTMLElement | null
selectMany(options: SelectManyOptions): Array<HTMLElement>
get firstChild(): HTMLElement | null
get lastChild(): HTMLElement | null
toString(): string
}
export declare class HTMLParser {
constructor(content: string)
selectFirst(options: SelectFirstOptions): HTMLElement | null
selectMany(options: SelectManyOptions): Array<HTMLElement>
}
export declare function css(query: string): QueryConfig
export declare function parse(content: string): HTMLParser
export interface QueryConfig {
query: string
type: QueryType
}
export declare const enum QueryType {
CSS = 0,
XPath = 1
}
export interface SelectFirstOptions {
query: QueryConfig
}
export interface SelectManyOptions {
query: QueryConfig
limit?: number
}
export declare function xpath(query: string): QueryConfig