Skip to content

Commit

Permalink
fix: don't load ambient worker types (#8483)
Browse files Browse the repository at this point in the history
fixes #8268
  • Loading branch information
dummdidumm committed Jan 13, 2023
1 parent 641184f commit 18a8c38
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 14 deletions.
6 changes: 6 additions & 0 deletions .changeset/eleven-rules-sleep.md
@@ -0,0 +1,6 @@
---
'@sveltejs/adapter-cloudflare': patch
'@sveltejs/adapter-cloudflare-workers': patch
---

fix: don't load ambient worker types
16 changes: 9 additions & 7 deletions packages/adapter-cloudflare-workers/ambient.d.ts
@@ -1,10 +1,12 @@
/// <reference types="@cloudflare/workers-types" />
import { Cache, CacheStorage } from '@cloudflare/workers-types';

declare namespace App {
export interface Platform {
context?: {
waitUntil(promise: Promise<any>): void;
};
caches?: CacheStorage & { default: Cache };
declare global {
namespace App {
export interface Platform {
context?: {
waitUntil(promise: Promise<any>): void;
};
caches?: CacheStorage & { default: Cache };
}
}
}
16 changes: 9 additions & 7 deletions packages/adapter-cloudflare/ambient.d.ts
@@ -1,10 +1,12 @@
/// <reference types="@cloudflare/workers-types" />
import { Cache, CacheStorage } from '@cloudflare/workers-types';

declare namespace App {
export interface Platform {
context?: {
waitUntil(promise: Promise<any>): void;
};
caches?: CacheStorage & { default: Cache };
declare global {
namespace App {
export interface Platform {
context?: {
waitUntil(promise: Promise<any>): void;
};
caches?: CacheStorage & { default: Cache };
}
}
}

0 comments on commit 18a8c38

Please sign in to comment.