UNPKG

727 BTypeScriptView Raw
1import { StreamResponse, BufferedStreamResponse } from '@worker-tools/stream-response';
2import { HTML } from './html.js';
3/**
4 * TBD
5 */
6export declare class HTMLResponse extends StreamResponse {
7 static contentType: string;
8 constructor(html: HTML, { headers: _headers, ...init }?: ResponseInit);
9}
10/**
11 * If for any reason you don't want to use streaming response bodies,
12 * you can use this class instead, which will buffer the entire body before releasing it to the network.
13 * Note that headers will still be sent immediately.
14 */
15export declare class BufferedHTMLResponse extends BufferedStreamResponse {
16 static contentType: string;
17 constructor(html: HTML, { headers: _headers, ...init }?: ResponseInit);
18}