From 3c43d98a5738a98301132c6152067d5762294569 Mon Sep 17 00:00:00 2001 From: Zichao Lan <121802791+Zephyruston@users.noreply.github.com> Date: Mon, 14 Jul 2025 05:21:56 +0800 Subject: [PATCH] docs: update `HandlerContext` -> `FreshContext` (#3092) 'HandlerContext' is deprecated.deno-ts(6385) --- docs/latest/concepts/routes.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/latest/concepts/routes.md b/docs/latest/concepts/routes.md index c3ce120d..f627ddbb 100644 --- a/docs/latest/concepts/routes.md +++ b/docs/latest/concepts/routes.md @@ -68,10 +68,10 @@ In the below example, a custom handler is used to add a custom header to the response after rendering the page component. ```tsx routes/html.tsx -import { HandlerContext, Handlers, PageProps } from "$fresh/server.ts"; +import { FreshContext, Handlers, PageProps } from "$fresh/server.ts"; export const handler: Handlers = { - async GET(_req: Request, ctx: HandlerContext) { + async GET(_req: Request, ctx: FreshContext) { const resp = await ctx.render(); resp.headers.set("X-Custom-Header", "Hello World"); return resp;