import type { H11 } from './core.ts'; export type Method = 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH' | 'HEAD' | 'OPTIONS'; export type Context = { req: Request; h11: H11; providers: Record; params: Record; data: Record; }; export type HandlerResponse = | Promise | undefined | Promise | void | Promise | Response | Promise; export type Handler = (props: Context) => HandlerResponse; export type HanlderEnt = { handlers: Handler[]; }; export type HandlersProps = Handler[] | [Handler[]] | [HanlderEnt]; export type HandlerReturn = Handler | Handler[] | HanlderEnt; export type FsApi = { getFileStream: (path: string) => ReadableStream; writeFileStream: (path: string, stream: ReadableStream) => Promise; writeFile: (path: string, text: string) => Promise; checkExist: (path: string) => Promise; mkdir: (path: string) => Promise; copyFile: (from: string, to: string) => Promise; rm: (path: string) => Promise; };