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
@@ -17,10 +17,10 @@ Let's look at the example from the routing page more closely. We'll flesh out
the handler so that we end up with something like the following:
```ts routes/x.tsx
import { HandlerContext, RouteConfig } from "$fresh/server.ts";
import { FreshContext, RouteConfig } from "$fresh/server.ts";
export const handler = {
GET(_req: Request, { params }: HandlerContext) {
GET(_req: Request, { params }: FreshContext) {
console.log(params);
return new Response(params.path);
},
@@ -48,10 +48,10 @@ show the following:
Let's look at something a bit more complex:
```ts routes/api.tsx
import { HandlerContext, RouteConfig } from "$fresh/server.ts";
import { FreshContext, RouteConfig } from "$fresh/server.ts";
export const handler = {
GET(_req: Request, { params }: HandlerContext) {
GET(_req: Request, { params }: FreshContext) {
console.log(params);
return new Response(params.path);
},