From 002e79ec2696e4ee0af52edcac15617d2d0023d1 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Thu, 19 Dec 2024 22:36:21 +0100 Subject: [PATCH] chore: fix type issues --- src/presets/cloudflare/runtime/cloudflare-pages.ts | 2 +- src/runtime/internal/storage.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/presets/cloudflare/runtime/cloudflare-pages.ts b/src/presets/cloudflare/runtime/cloudflare-pages.ts index 6ff042c4bf..a7f59cad6e 100644 --- a/src/presets/cloudflare/runtime/cloudflare-pages.ts +++ b/src/presets/cloudflare/runtime/cloudflare-pages.ts @@ -41,7 +41,7 @@ export default { import.meta._websocket && request.headers.get("upgrade") === "websocket" ) { - return ws!.handleUpgrade(request as any, env, context); + return ws!.handleUpgrade(request as any, env, context as unknown as ExecutionContext); } const url = new URL(request.url); diff --git a/src/runtime/internal/storage.ts b/src/runtime/internal/storage.ts index 4fa1f94b90..ad76e9098e 100644 --- a/src/runtime/internal/storage.ts +++ b/src/runtime/internal/storage.ts @@ -5,5 +5,5 @@ import { storage } from "#nitro-internal-virtual/storage"; export function useStorage( base = "" ): Storage { - return base ? prefixStorage(storage, base) : storage; + return (base ? prefixStorage(storage, base) : storage) as unknown as Storage; }