fix(server): make AppProps generic (#1449)

This commit is contained in:
Reed von Redwitz
2023-08-04 12:05:15 +02:00
committed by GitHub
parent 76f0f4a84a
commit 630f0a2322
4 changed files with 15 additions and 6 deletions
+7 -2
View File
@@ -1,11 +1,16 @@
import { Head } from "$fresh/runtime.ts";
import { AppProps } from "$fresh/server.ts";
export default function App(props: AppProps) {
export type TestState = {
root: string;
stateInProps: string;
};
export default function App(props: AppProps<unknown, TestState>) {
const statefulValue = props.state?.root === "root_mw"
? "The freshest framework!"
: "";
const specialCase = props.state?.stateInProps as string;
const specialCase = props.state?.stateInProps;
return (
<>
<Head>