first commit
This commit is contained in:
commit
d69d3b7033
21 changed files with 1142 additions and 0 deletions
20
types/routes.d.ts
vendored
Normal file
20
types/routes.d.ts
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
type RouteDef = {
|
||||
method: string;
|
||||
accepts: string | null;
|
||||
returns: string;
|
||||
needsBody?: "multipart" | "json";
|
||||
};
|
||||
|
||||
type Query = Record<string, string>;
|
||||
type Params = Record<string, string>;
|
||||
|
||||
type RouteModule = {
|
||||
handler: (
|
||||
request: Request,
|
||||
server: BunServer,
|
||||
requestBody: unknown,
|
||||
query: Query,
|
||||
params: Params,
|
||||
) => Promise<Response> | Response;
|
||||
routeDef: RouteDef;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue