feat: pass middleware state in props (#1264)

This commit is contained in:
Reed von Redwitz
2023-06-28 14:53:42 +02:00
committed by GitHub
parent 851f8d60aa
commit 0db3a0911a
12 changed files with 105 additions and 20 deletions
+2 -1
View File
@@ -38,7 +38,7 @@ export type RenderFunction = (
/// --- ROUTES ---
// deno-lint-ignore no-explicit-any
export interface PageProps<T = any> {
export interface PageProps<T = any, S = Record<string, unknown>> {
/** The URL of the request that resulted in this page being rendered. */
url: URL;
@@ -61,6 +61,7 @@ export interface PageProps<T = any> {
* `undefined`.
*/
data: T;
state: S;
}
export interface RouteConfig {