feat: support route layouts via _layout.tsx (#1506)

Co-authored-by: Marvin Hagemeister <marvin@deno.com>
This commit is contained in:
Michael Gearhardt
2023-07-26 11:49:08 +02:00
committed by GitHub
co-authored by Marvin Hagemeister
parent 18857ea052
commit 1ed93cec88
27 changed files with 397 additions and 3 deletions
+19
View File
@@ -171,6 +171,25 @@ export interface AppModule {
default: ComponentType<AppProps>;
}
export interface LayoutProps extends PageProps {
Component: ComponentType<Record<never, never>>;
}
export interface LayoutModule {
default: ComponentType<LayoutProps>;
}
export interface LayoutRoute extends LayoutModule {
/**
* path-to-regexp style url path
*/
pattern: string;
/**
* URLPattern of the route
*/
compiledPattern: URLPattern;
}
// --- UNKNOWN PAGE ---
// deno-lint-ignore no-explicit-any