diff --git a/src/context.ts b/src/context.ts index 77e27e6427b..0ea43103126 100644 --- a/src/context.ts +++ b/src/context.ts @@ -36,6 +36,8 @@ export interface FreshContext { readonly state: State; /** The original incoming `Request` object` */ readonly request: Request; + /** @deprecated This is an alias for internal use only. Use {@linkcode FreshContext[request]} instead. */ + readonly req: Request; /** * The request url parsed into an `URL` instance. This is typically used * to apply logic based on the pathname of the incoming url or when @@ -93,6 +95,8 @@ export class FreshReqContext config: ResolvedFreshConfig; url: URL; request: Request; + /** @deprecated This is an alias for internal use only. Use {@linkcode FreshReqContext[request]} instead. */ + req: Request; params: Record; state: State = {} as State; data: unknown = undefined; @@ -123,6 +127,7 @@ export class FreshReqContext ) { this.url = url; this.request = request; + this.req = request; this.info = info; this.params = params; this.config = config;