diff --git a/packages/integrations/cloudflare/src/runtime.ts b/packages/integrations/cloudflare/src/runtime.ts index bb7f13fa6686a..d2e5c128bb37b 100644 --- a/packages/integrations/cloudflare/src/runtime.ts +++ b/packages/integrations/cloudflare/src/runtime.ts @@ -1,11 +1,11 @@ -export type WorkerRuntime = { +export type WorkerRuntime = { name: 'cloudflare'; env: T; waitUntil(promise: Promise): void; passThroughOnException(): void; }; -export type PagesRuntime = { +export type PagesRuntime = { name: 'cloudflare'; env: T; functionPath: string; @@ -15,6 +15,6 @@ export type PagesRuntime = { next(request: Request): void; }; -export function getRuntime(request: Request): WorkerRuntime | PagesRuntime { +export function getRuntime(request: Request): WorkerRuntime | PagesRuntime { return Reflect.get(request, Symbol.for('runtime')); }