///
///
///
import type { IncomingMessage as I, ServerResponse as S } from 'node:http';
export type ReadStreamOptions = Partial<{
flags: string;
encoding: BufferEncoding;
fd: number;
mode: number;
autoClose: boolean;
emitClose: boolean;
start: number;
end: number;
highWaterMark: number;
}>;
export type SendFileOptions = ReadStreamOptions & Partial<{
root: string;
headers: Record;
caching: Partial<{
maxAge: number;
immutable: boolean;
}>;
}>;
export type Caching = Partial<{
maxAge: number;
immutable: boolean;
}>;
type Req = Pick;
type Res = Pick & NodeJS.WritableStream;
export declare const enableCaching: (res: Res, caching: Caching) => void;
/**
* Sends a file by piping a stream to response.
*
* It also checks for extension to set a proper `Content-Type` header.
*
* Path argument must be absolute. To use a relative path, specify the `root` option first.
*
* @param res Response
*/
export declare const sendFile: (req: Request_1, res: Response_1) => (path: string, opts?: SendFileOptions, cb?: (err?: any) => void) => Response_1;
export {};
//# sourceMappingURL=sendFile.d.ts.map