Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/fresh/src/server/types.ts>FreshContext

The next-gen web framework.
Extremely Popular
Go to Latest
interface FreshContext
import { type FreshContext } from "https://deno.land/x/fresh@1.6.5/src/server/types.ts";

Type Parameters

optional
State = Record<string, unknown>
optional
Data = any
optional
NotFoundData = Data

Properties

optional
localAddr: Deno.NetAddr
remoteAddr: Deno.NetAddr
url: URL
basePath: string
route: string
deprecated
pattern: string
destination: router.DestinationKind
params: Record<string, string>
isPartial: boolean
state: State
data: Data
optional
error: unknown

The error that caused the error page to be loaded.

optional
codeFrame: unknown

Sringified code frame of the error rendering failed (only in development mode)

renderNotFound: (data?: NotFoundData) => Response | Promise<Response>
render: (data?: Data, options?: RenderOptions) => Response | Promise<Response>
Component: ComponentType<unknown>
next: () => Promise<Response>