site-panzai/node_modules/srvx/dist/static.d.mts

21 lines
572 B
TypeScript
Raw Normal View History

2026-11-13 13:57:04 +01:00
import { ServerMiddleware } from "./_chunks/types.mjs";
interface ServeStaticOptions {
/**
* The directory to serve static files from.
*/
dir: string;
/**
* The HTTP methods to allow for serving static files.
*/
methods?: string[];
/**
* A function to modify the HTML content before serving it.
*/
renderHTML?: (ctx: {
request: Request;
html: string;
filename: string;
}) => Response | Promise<Response>;
}
declare const serveStatic: (options: ServeStaticOptions) => ServerMiddleware;
export { ServeStaticOptions, serveStatic };