Fix types error

This commit is contained in:
Benjamin Toby 2026-04-10 11:39:50 +01:00
parent 6477f446d1
commit 972f6945c2
4 changed files with 8 additions and 3 deletions

View File

@ -295,9 +295,11 @@ export type GrabTSXModuleBatchMap = {
tsx: string;
page_file_path: string;
};
export type BunextAPIRouteHandler<T extends BunextAPIRouteJSONRes = BunextAPIRouteJSONRes & {
export type BunextAPIRouteHandler<T extends BunextAPIRouteJSONRes = {
[k: string]: any;
}> = (params: BunxRouteParams) => Promise<Response | T> | Response | T;
export type BunextAPIRouteJSONRes = {
bunext_api_route_res_options?: ResponseInit;
} & {
[k: string]: any;
};

View File

@ -1,6 +1,6 @@
{
"name": "@moduletrace/bunext",
"version": "1.0.64",
"version": "1.0.65",
"main": "dist/index.js",
"module": "index.ts",
"dependencies": {

View File

@ -1,4 +1,5 @@
import type {
APIResponseObject,
BunextAPIRouteHandler,
BunextServerRouteConfig,
BunxRouteParams,

View File

@ -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> | Response | T;
export type BunextAPIRouteJSONRes = {
bunext_api_route_res_options?: ResponseInit;
} & {
[k: string]: any;
};