docs: Remove references to deprecated types (#2125)

As per the [1.6
release](https://deno.com/blog/fresh-1.6#simplified-typings), and
commentary by @csvn
[here](https://github.com/denoland/fresh/issues/2108#issuecomment-1836625789),
this PR aims to replace the references to deprecated typing in the
documentation.

Please see inline commentary for parts I'm unclear on.
This commit is contained in:
Christos Hrousis
2023-12-02 11:14:37 +00:00
committed by GitHub
parent 6eccdcf1a1
commit f3578f863f
10 changed files with 44 additions and 41 deletions
+2 -2
View File
@@ -35,7 +35,7 @@ export default defineConfig({
But what's going on in this new `_middleware.ts` we've created?
```ts routes/_middleware.ts
import { MiddlewareHandlerContext } from "$fresh/server.ts";
import { FreshContext } from "$fresh/server.ts";
export interface State {
context: Context;
@@ -64,7 +64,7 @@ export class Context {
export async function handler(
_req: Request,
ctx: MiddlewareHandlerContext<State>,
ctx: FreshContext<State>,
) {
ctx.state.context = Context.instance();
if (ctx.destination === "route") {