- Remove Bunserver and just use buns type
All checks were successful
Code quality checks / biome (push) Successful in 10s
All checks were successful
Code quality checks / biome (push) Successful in 10s
- Stop logging every start aswell as available routes
This commit is contained in:
parent
69f0c3d8e9
commit
2eebc3126a
5 changed files with 18 additions and 21 deletions
14
types/bun.d.ts
vendored
14
types/bun.d.ts
vendored
|
@ -1,14 +0,0 @@
|
|||
import type { Server } from "bun";
|
||||
|
||||
type Query = Record<string, string>;
|
||||
type Params = Record<string, string>;
|
||||
|
||||
declare global {
|
||||
type BunServer = Server;
|
||||
|
||||
interface ExtendedRequest extends Request {
|
||||
startPerf: number;
|
||||
query: Query;
|
||||
params: Params;
|
||||
}
|
||||
}
|
2
types/routes.d.ts
vendored
2
types/routes.d.ts
vendored
|
@ -9,7 +9,7 @@ type RouteModule = {
|
|||
handler: (
|
||||
request: Request | ExtendedRequest,
|
||||
requestBody: unknown,
|
||||
server: BunServer,
|
||||
server: Server,
|
||||
) => Promise<Response> | Response;
|
||||
routeDef: RouteDef;
|
||||
};
|
||||
|
|
8
types/server.d.ts
vendored
Normal file
8
types/server.d.ts
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
type Query = Record<string, string>;
|
||||
type Params = Record<string, string>;
|
||||
|
||||
interface ExtendedRequest extends Request {
|
||||
startPerf: number;
|
||||
query: Query;
|
||||
params: Params;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue