From e11449f7cbea14c6cd527f1fe9b37d99800888df Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 24 Jan 2024 12:12:10 -0500 Subject: [PATCH] chore: flesh out cloudflare bindings docs --- .../docs/25-build-and-deploy/60-adapter-cloudflare.md | 4 +++- .../docs/25-build-and-deploy/70-adapter-cloudflare-workers.md | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/documentation/docs/25-build-and-deploy/60-adapter-cloudflare.md b/documentation/docs/25-build-and-deploy/60-adapter-cloudflare.md index 5859d1326fbc..3d72f3114fcb 100644 --- a/documentation/docs/25-build-and-deploy/60-adapter-cloudflare.md +++ b/documentation/docs/25-build-and-deploy/60-adapter-cloudflare.md @@ -70,10 +70,12 @@ export async function POST({ request, platform }) { > SvelteKit's built-in `$env` module should be preferred for environment variables. -To make these types available to your app, reference them in your `src/app.d.ts`: +To make these types available to your app, install `@cloudflare/workers-types` and reference them in your `src/app.d.ts`: ```diff /// file: src/app.d.ts ++import { KVNamespace, DurableObjectNamespace } from '@cloudflare/workers-types'; + declare global { namespace App { interface Platform { diff --git a/documentation/docs/25-build-and-deploy/70-adapter-cloudflare-workers.md b/documentation/docs/25-build-and-deploy/70-adapter-cloudflare-workers.md index 68e54b320a7b..7dad79521a48 100644 --- a/documentation/docs/25-build-and-deploy/70-adapter-cloudflare-workers.md +++ b/documentation/docs/25-build-and-deploy/70-adapter-cloudflare-workers.md @@ -97,10 +97,12 @@ export async function POST({ request, platform }) { > SvelteKit's built-in `$env` module should be preferred for environment variables. -To make these types available to your app, reference them in your `src/app.d.ts`: +To make these types available to your app, install `@cloudflare/workers-types` and reference them in your `src/app.d.ts`: ```diff /// file: src/app.d.ts ++import { KVNamespace, DurableObjectNamespace } from '@cloudflare/workers-types'; + declare global { namespace App { interface Platform {