Type alias EventContext<Env, P, Data>

EventContext<Env, P, Data>: {
    data: Data;
    env: Env & {
        ASSETS: {
            fetch: typeof fetch;
        };
    };
    functionPath: string;
    next: ((input?, init?) => Promise<Response>);
    params: Params<P>;
    passThroughOnException: (() => void);
    request: Request<unknown, IncomingRequestCfProperties<unknown>>;
    waitUntil: ((promise) => void);
}

Type Parameters

  • Env
  • P extends string
  • Data

Type declaration

  • data: Data
  • env: Env & {
        ASSETS: {
            fetch: typeof fetch;
        };
    }
  • functionPath: string
  • next: ((input?, init?) => Promise<Response>)
  • params: Params<P>
  • passThroughOnException: (() => void)
      • (): void
      • Returns void

  • request: Request<unknown, IncomingRequestCfProperties<unknown>>
  • waitUntil: ((promise) => void)
      • (promise): void
      • Parameters

        • promise: Promise<any>

        Returns void