Skip to content

Commit

Permalink
add req deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
timreichen committed Dec 12, 2024
1 parent eb4251e commit d7d0410
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ export interface FreshContext<State = unknown> {
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
Expand Down Expand Up @@ -93,6 +95,8 @@ export class FreshReqContext<State>
config: ResolvedFreshConfig;
url: URL;
request: Request;
/** @deprecated This is an alias for internal use only. Use {@linkcode FreshReqContext[request]} instead. */
req: Request;
params: Record<string, string>;
state: State = {} as State;
data: unknown = undefined;
Expand Down Expand Up @@ -123,6 +127,7 @@ export class FreshReqContext<State>
) {
this.url = url;
this.request = request;
this.req = request;
this.info = info;
this.params = params;
this.config = config;
Expand Down

0 comments on commit d7d0410

Please sign in to comment.