/// /// /// import { Readable } from 'node:stream'; import type { IncomingMessage, ServerResponse } from 'node:http'; import type { SendFileOptions } from './staticHelpers.js'; export interface Chainable

any> { (next: Next, ...p: P): R; } export interface Context any> { value: Awaited; get(req: IncomingMessage): T; set(req: IncomingMessage, value: T): void; (...params: Params): Promise; chain(...params: Params): Chainable; } export declare function makeDxContext any>(maker: (...params: Params) => T | Promise): Context; export declare function dxServer(req: IncomingMessage, res: ServerResponse, options?: { jsonBeautify?: boolean; disableEtag?: boolean; }): Chainable; export declare function getReq(): IncomingMessage; export declare function getRes(): ServerResponse; export declare function setText(text: string, { status }?: { status?: number; }): void; export declare function setEmpty({ status }?: { status?: number; }): void; export declare function setHtml(html: string, opts?: { status?: number; }): void; export declare function setFile(filePath: string, options?: SendFileOptions): void; export declare function setBuffer(buffer: Buffer, { status }?: { status?: number; }): void; export declare function setNodeStream(stream: Readable, { status }?: { status?: number; }): void; export declare function setWebStream(stream: ReadableStream, { status }?: { status?: number; }): void; export declare function setJson(json: any, { status }?: { status?: number; }): void; export declare function setRedirect(url: string, status: 301 | 302): void;