@worker-tools/html
Version:
HTML templating and streaming response library for Worker Runtimes such as Cloudflare Workers.
19 lines (18 loc) • 727 B
TypeScript
import { StreamResponse, BufferedStreamResponse } from '@worker-tools/stream-response';
import { HTML } from './html.js';
/**
* TBD
*/
export declare class HTMLResponse extends StreamResponse {
static contentType: string;
constructor(html: HTML, { headers: _headers, ...init }?: ResponseInit);
}
/**
* If for any reason you don't want to use streaming response bodies,
* you can use this class instead, which will buffer the entire body before releasing it to the network.
* Note that headers will still be sent immediately.
*/
export declare class BufferedHTMLResponse extends BufferedStreamResponse {
static contentType: string;
constructor(html: HTML, { headers: _headers, ...init }?: ResponseInit);
}