Skip to content

Commit

Permalink
Merge pull request #1638 from cloudflare/bcoll/use-incoming-cf-proper…
Browse files Browse the repository at this point in the history
…ties-for-pages-functions

Use `IncomingRequestCfProperties` in Pages `EventContext`
  • Loading branch information
mrbbot authored Feb 9, 2024
2 parents 06c09e7 + b0cbc39 commit c8ba8d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions types/defines/pages.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
type Params<P extends string = any> = Record<P, string | string[]>;

type EventContext<Env, P extends string, Data> = {
request: Request;
request: Request<unknown, IncomingRequestCfProperties<unknown>>;
functionPath: string;
waitUntil: (promise: Promise<any>) => void;
passThroughOnException: () => void;
Expand All @@ -18,7 +18,7 @@ type PagesFunction<
> = (context: EventContext<Env, Params, Data>) => Response | Promise<Response>;

type EventPluginContext<Env, P extends string, Data, PluginArgs> = {
request: Request;
request: Request<unknown, IncomingRequestCfProperties<unknown>>;
functionPath: string;
waitUntil: (promise: Promise<any>) => void;
passThroughOnException: () => void;
Expand Down

0 comments on commit c8ba8d1

Please sign in to comment.