keiro
Version:
A filesystem routing middleware
32 lines • 667 B
text/typescript
export type RequestParts = {
type: "request";
url: string;
method: string;
headers: Record<string, string[]>;
} | {
type: "body";
data: Uint8Array;
} | {
type: "done";
};
export type ResponseParts = {
type: "response";
status: number;
statusText: string;
headers: Record<string, string[]>;
body?: string;
} | {
type: "chunk";
data: Uint8Array;
done: false;
} | {
type: "chunk";
data?: undefined;
done: true;
};
export interface WorkerRouterData {
routesFilePaths: Record<string, string>;
middlewareFilePath?: string;
notFoundFilePath?: string;
}
//# sourceMappingURL=worker.d.mts.map