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:
@@ -324,10 +324,10 @@ export const config: RouteConfig = {
|
||||
```
|
||||
|
||||
```ts routes/reportHandler.ts
|
||||
import { HandlerContext } from "$fresh/server.ts";
|
||||
import { FreshContext } from "$fresh/server.ts";
|
||||
|
||||
export const handler = {
|
||||
async POST(req: Request, _ctx: HandlerContext) {
|
||||
async POST(req: Request, _ctx: FreshContext) {
|
||||
const body = await req.json();
|
||||
const report = JSON.stringify(body, null, 2);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user