diff --git a/dist/types/index.d.ts b/dist/types/index.d.ts index 4ec66ab..bf2cfa6 100644 --- a/dist/types/index.d.ts +++ b/dist/types/index.d.ts @@ -295,9 +295,11 @@ export type GrabTSXModuleBatchMap = { tsx: string; page_file_path: string; }; -export type BunextAPIRouteHandler = (params: BunxRouteParams) => Promise | Response | T; export type BunextAPIRouteJSONRes = { bunext_api_route_res_options?: ResponseInit; +} & { + [k: string]: any; }; diff --git a/package.json b/package.json index 7d5ee1c..ede5cb3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@moduletrace/bunext", - "version": "1.0.64", + "version": "1.0.65", "main": "dist/index.js", "module": "index.ts", "dependencies": { diff --git a/src/functions/server/handle-routes.ts b/src/functions/server/handle-routes.ts index 3d7592a..2ad50f9 100644 --- a/src/functions/server/handle-routes.ts +++ b/src/functions/server/handle-routes.ts @@ -1,4 +1,5 @@ import type { + APIResponseObject, BunextAPIRouteHandler, BunextServerRouteConfig, BunxRouteParams, diff --git a/src/types/index.ts b/src/types/index.ts index 55655ca..feabd46 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -341,11 +341,13 @@ export type GrabTSXModuleBatchMap = { }; export type BunextAPIRouteHandler< - T extends BunextAPIRouteJSONRes = BunextAPIRouteJSONRes & { + T extends BunextAPIRouteJSONRes = { [k: string]: any; }, > = (params: BunxRouteParams) => Promise | Response | T; export type BunextAPIRouteJSONRes = { bunext_api_route_res_options?: ResponseInit; +} & { + [k: string]: any; };