fix(server): make LayoutProps generic (#1592)

This commit is contained in:
Reed von Redwitz
2023-08-05 22:27:13 +02:00
committed by GitHub
parent cc0e2cb2ec
commit 1fb7f3bea9
5 changed files with 55 additions and 32 deletions
@@ -0,0 +1,13 @@
import { MiddlewareHandlerContext } from "$fresh/server.ts";
export type LayoutState = {
something: string;
};
export const handler = (
_req: Request,
ctx: MiddlewareHandlerContext<LayoutState>,
) => {
ctx.state.something = "it works";
return ctx.next();
};