Fix types error

This commit is contained in:
2026-04-10 11:42:22 +01:00
parent 972f6945c2
commit 349b99bacf
4 changed files with 11 additions and 4 deletions
-1
View File
@@ -1,5 +1,4 @@
import type {
APIResponseObject,
BunextAPIRouteHandler,
BunextServerRouteConfig,
BunxRouteParams,
+9 -1
View File
@@ -344,7 +344,15 @@ export type BunextAPIRouteHandler<
T extends BunextAPIRouteJSONRes = {
[k: string]: any;
},
> = (params: BunxRouteParams) => Promise<Response | T> | Response | T;
> = (
params: BunxRouteParams,
) =>
| Promise<
| Response
| (T & Pick<BunextAPIRouteJSONRes, "bunext_api_route_res_options">)
>
| Response
| (T & Pick<BunextAPIRouteJSONRes, "bunext_api_route_res_options">);
export type BunextAPIRouteJSONRes = {
bunext_api_route_res_options?: ResponseInit;