the latest code

This commit is contained in:
ghassan committed 2026-01-26 01:40:48 +03:00
1 parent d28bc1ed43
commit 9bbb24a52b
12226 files changed
+1455579 -21

No files matched your search

+1
View File
@@ -0,0 +1 @@
export declare function resolvePageComponent<T>(path: string | string[], pages: Record<string, Promise<T> | (() => Promise<T>)>): Promise<T>;
+10
View File
@@ -0,0 +1,10 @@
export async function resolvePageComponent(path, pages) {
for (const p of (Array.isArray(path) ? path : [path])) {
const page = pages[p];
if (typeof page === 'undefined') {
continue;
}
return typeof page === 'function' ? page() : page;
}
throw new Error(`Page not found: ${path}`);
}