render-result.d.ts 583 B

1234567891011121314151617
  1. /// <reference types="node" />
  2. import type { ServerResponse } from 'http';
  3. declare type ContentTypeOption = string | undefined;
  4. export default class RenderResult {
  5. private _result;
  6. private _contentType;
  7. constructor(response: string | ReadableStream<Uint8Array>, { contentType }?: {
  8. contentType?: ContentTypeOption;
  9. });
  10. contentType(): ContentTypeOption;
  11. toUnchunkedString(): string;
  12. pipe(res: ServerResponse): Promise<void>;
  13. isDynamic(): boolean;
  14. static fromStatic(value: string): RenderResult;
  15. static empty: RenderResult;
  16. }
  17. export {};