import { UnknownPageProps } from "$fresh/server.ts"; type Data = { hello: string }; type State = { root: string }; export default function NotFoundPage( { data, state, url }: UnknownPageProps, ) { // Checks that we have the correct type for state state.root satisfies string; return ( <>

404 not found: {url.pathname}

{data?.hello &&

Hello {data.hello}

}

State root: {state.root}

); }