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; tsx: string;
page_file_path: string; page_file_path: string;
}; };
export type BunextAPIRouteHandler<T extends BunextAPIRouteJSONRes = BunextAPIRouteJSONRes & { export type BunextAPIRouteHandler<T extends BunextAPIRouteJSONRes = {
[k: string]: any; [k: string]: any;
}> = (params: BunxRouteParams) => Promise<Response | T> | Response | T; }> = (params: BunxRouteParams) => Promise<Response | T> | Response | T;
export type BunextAPIRouteJSONRes = { export type BunextAPIRouteJSONRes = {
bunext_api_route_res_options?: ResponseInit; bunext_api_route_res_options?: ResponseInit;
} & {
[k: string]: any;
}; };

View File

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

View File

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

View File

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