1 |
|
2 | export declare type Awaitable<T> = T | Promise<T>;
|
3 | export declare function append<K, V>(m: Map<K, V[]>, k: K, v: V): Map<K, V[]>;
|
4 | export declare function promiseToAsyncIterable<T>(promise: Promise<T>): AsyncIterableIterator<T>;
|
5 | export declare function treeWalkerToIter(walker: TreeWalker): IterableIterator<Node>;
|
6 | declare type Content = string;
|
7 | export declare class ParsedHTMLRewriterNode {
|
8 | #private;
|
9 | constructor(node: Element | Text | Comment | null, document: Document);
|
10 | get removed(): boolean;
|
11 | before(content: Content, opts?: ContentOptions): this;
|
12 | after(content: Content, opts?: ContentOptions): this;
|
13 | replace(content: Content, opts?: ContentOptions): this;
|
14 | remove(): this;
|
15 | }
|
16 | export declare class ParsedHTMLRewriterElement extends ParsedHTMLRewriterNode {
|
17 | #private;
|
18 | constructor(node: Element, document: Document);
|
19 | get tagName(): string;
|
20 | get attributes(): Iterable<[string, string]>;
|
21 | get namespaceURI(): string | null;
|
22 | getAttribute(name: string): string | null;
|
23 | hasAttribute(name: string): boolean;
|
24 | setAttribute(name: string, value: string): this;
|
25 | removeAttribute(name: string): this;
|
26 | prepend(content: Content, opts?: ContentOptions): this;
|
27 | append(content: Content, opts?: ContentOptions): this;
|
28 | setInnerContent(content: Content, opts?: ContentOptions): this;
|
29 | removeAndKeepContent(): this;
|
30 | }
|
31 | export declare class ParsedHTMLRewriterText extends ParsedHTMLRewriterNode {
|
32 | #private;
|
33 | constructor(text: Text | null, document: Document);
|
34 | get text(): string;
|
35 | get lastInTextNode(): boolean;
|
36 | }
|
37 | export declare class ParsedHTMLRewriterComment extends ParsedHTMLRewriterNode {
|
38 | #private;
|
39 | constructor(comm: Comment, document: Document);
|
40 | get text(): string;
|
41 | set text(value: string);
|
42 | }
|
43 | export declare class ParsedHTMLRewriterDocumentType {
|
44 | #private;
|
45 | constructor(doctype: DocumentType);
|
46 | get name(): string;
|
47 | get publicId(): string;
|
48 | get systemId(): string;
|
49 | }
|
50 | export declare class ParsedHTMLRewriterEnd {
|
51 | #private;
|
52 | constructor(document: Document);
|
53 | append(content: Content, opts?: ContentOptions): this;
|
54 | }
|
55 | export {};
|
56 |
|
\ | No newline at end of file |