docs: fix deprecated type usage in example code (#2203)
Fixes deprecated example in docs. <img width="760" alt="image" src="https://github.com/denoland/fresh/assets/6600962/1e239f0f-0798-4ca0-b84d-d4266b6dfc31">
This commit is contained in:
@@ -26,10 +26,10 @@ the handler's `render` function.
|
|||||||
Let's look at a basic route that returns a plain text string:
|
Let's look at a basic route that returns a plain text string:
|
||||||
|
|
||||||
```tsx routes/plain.tsx
|
```tsx routes/plain.tsx
|
||||||
import { HandlerContext, Handlers } from "$fresh/server.ts";
|
import { FreshContext, Handlers } from "$fresh/server.ts";
|
||||||
|
|
||||||
export const handler: Handlers = {
|
export const handler: Handlers = {
|
||||||
GET(_req: Request, _ctx: HandlerContext) {
|
GET(_req: Request, _ctx: FreshContext) {
|
||||||
return new Response("Hello World");
|
return new Response("Hello World");
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user