Update API routes function
This commit is contained in:
+11
-6
@@ -142,12 +142,7 @@ export type APIResponseObject<
|
||||
};
|
||||
|
||||
export type BunextServerRouteConfig = {
|
||||
maxRequestBodyMB?: number;
|
||||
};
|
||||
|
||||
export type PageDistGenParams = {
|
||||
pageName: string;
|
||||
page_file: string;
|
||||
max_request_body_mb?: number;
|
||||
};
|
||||
|
||||
export type LivePageDistGenParams = {
|
||||
@@ -344,3 +339,13 @@ export type GrabTSXModuleBatchMap = {
|
||||
tsx: string;
|
||||
page_file_path: string;
|
||||
};
|
||||
|
||||
export type BunextAPIRouteHandler<
|
||||
T extends BunextAPIRouteJSONRes = BunextAPIRouteJSONRes & {
|
||||
[k: string]: any;
|
||||
},
|
||||
> = (params: BunxRouteParams) => Promise<Response | T> | Response | T;
|
||||
|
||||
export type BunextAPIRouteJSONRes = {
|
||||
bunext_api_route_res_options?: ResponseInit;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user