routup
Version:
Routup is a minimalistic http based routing framework.
18 lines (17 loc) • 589 B
TypeScript
import type { Response } from '../types';
export type SendFileContentOptions = {
end?: number;
start?: number;
};
export type SendFileStats = {
size?: number;
mtime?: Date | number | string;
name?: string;
};
export type SendFileOptions = {
stats: () => Promise<SendFileStats> | SendFileStats;
content: (options: SendFileContentOptions) => Promise<unknown> | unknown;
attachment?: boolean;
name?: string;
};
export declare function sendFile(res: Response, options: SendFileOptions, next?: (err?: Error) => Promise<unknown> | unknown): Promise<unknown>;