feat: pass middleware state in props (#1264)
This commit is contained in:
+2
-1
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user