Update page server types

This commit is contained in:
2026-08-14 06:49:12 +01:00
parent 8d12329f01
commit 22d3dedab2
5 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ export default async function grabPageServerRes({ url, query, routeParams, serve
const serverData = await server_function({ const serverData = await server_function({
...routeParams, ...routeParams,
query: { ...routeParams.query, ...query }, query: { ...routeParams.query, ...query },
props: init_props, props: init_props || undefined,
}); });
return _.merge(default_props, serverData); return _.merge(default_props, serverData);
} }
+1 -1
View File
@@ -213,7 +213,7 @@ export type BunextPageServerFn<T extends {
} = { } = {
[k: string]: any; [k: string]: any;
}> = (ctx: Omit<BunxRouteParams, "body"> & { }> = (ctx: Omit<BunxRouteParams, "body"> & {
props?: any; props?: T;
}) => Promise<BunextPageModuleServerReturn<T>>; }) => Promise<BunextPageModuleServerReturn<T>>;
export type BunextRouteConfig = { export type BunextRouteConfig = {
/** /**
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@moduletrace/bunext", "name": "@moduletrace/bunext",
"version": "1.1.1", "version": "1.1.2",
"main": "dist/index.js", "main": "dist/index.js",
"module": "index.ts", "module": "index.ts",
"dependencies": { "dependencies": {
@@ -52,7 +52,7 @@ export default async function grabPageServerRes({
const serverData = await server_function({ const serverData = await server_function({
...routeParams, ...routeParams,
query: { ...routeParams.query, ...query }, query: { ...routeParams.query, ...query },
props: init_props, props: init_props || undefined,
}); });
return _.merge(default_props, serverData); return _.merge(default_props, serverData);
+1 -1
View File
@@ -246,7 +246,7 @@ export type BunextPageServerFn<
T extends { [k: string]: any } = { [k: string]: any }, T extends { [k: string]: any } = { [k: string]: any },
> = ( > = (
ctx: Omit<BunxRouteParams, "body"> & { ctx: Omit<BunxRouteParams, "body"> & {
props?: any; props?: T;
}, },
) => Promise<BunextPageModuleServerReturn<T>>; ) => Promise<BunextPageModuleServerReturn<T>>;