UNPKG

710 BTypeScriptView Raw
1import "./_dnt.polyfills.js";
2import type { ContentTypeOptions, Element, EndTag, Comment, TextChunk, Doctype, DocumentEnd, ElementHandlers, DocumentHandlers } from "./vendor/html_rewriter.d.d.js";
3export type { ContentTypeOptions, Element, EndTag, Comment, TextChunk, Doctype, DocumentEnd, ElementHandlers, DocumentHandlers, };
4declare const kEnableEsiTags: unique symbol;
5export declare class HTMLRewriter {
6 #private;
7 [kEnableEsiTags]: boolean;
8 constructor();
9 on(selector: string, handlers: ElementHandlers): this;
10 onDocument(handlers: DocumentHandlers): this;
11 transform(response: Response): Response;
12}
13export declare function withEnableEsiTags(rewriter: HTMLRewriter): HTMLRewriter;