Fix types error
This commit is contained in:
parent
972f6945c2
commit
349b99bacf
2
dist/types/index.d.ts
vendored
2
dist/types/index.d.ts
vendored
@ -297,7 +297,7 @@ export type GrabTSXModuleBatchMap = {
|
||||
};
|
||||
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;
|
||||
} & {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@moduletrace/bunext",
|
||||
"version": "1.0.65",
|
||||
"version": "1.0.67",
|
||||
"main": "dist/index.js",
|
||||
"module": "index.ts",
|
||||
"dependencies": {
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
import type {
|
||||
APIResponseObject,
|
||||
BunextAPIRouteHandler,
|
||||
BunextServerRouteConfig,
|
||||
BunxRouteParams,
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user