Files
2026-04-26 19:42:42 +02:00

18 lines
716 B
TypeScript
Executable File

import { Context, Env, MiddlewareHandler } from "hono";
//#region src/serve-static.d.ts
type ServeStaticOptions<E extends Env = Env> = {
/**
* Root path, relative to current working directory from which the app was started. Absolute paths are not supported.
*/
root?: string;
path?: string;
index?: string;
precompressed?: boolean;
rewriteRequestPath?: (path: string, c: Context<E>) => string;
onFound?: (path: string, c: Context<E>) => void | Promise<void>;
onNotFound?: (path: string, c: Context<E>) => void | Promise<void>;
};
declare const serveStatic: <E extends Env = any>(options?: ServeStaticOptions<E>) => MiddlewareHandler<E>;
//#endregion
export { ServeStaticOptions, serveStatic };