From 0298664c4179f81aa2eeb45b6eb43fb96819f957 Mon Sep 17 00:00:00 2001 From: AirBorne04 Date: Thu, 20 Oct 2022 11:59:13 +0200 Subject: [PATCH] added default types --- packages/integrations/cloudflare/src/runtime.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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')); }