Skip to content

Commit c2ffdcf

Browse files
docs: add note about installing workers types (#11731)
Co-authored-by: Chew Tee Ming <[email protected]>
1 parent 043cdac commit c2ffdcf

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

documentation/docs/25-build-and-deploy/60-adapter-cloudflare.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@ export async function POST({ request, platform }) {
8282

8383
> [!NOTE] SvelteKit's built-in `$env` module should be preferred for environment variables.
8484
85-
To include type declarations for your bindings, reference them in your `src/app.d.ts`:
85+
To make these types available to your app, install `@cloudflare/workers-types` and reference them in your `src/app.d.ts`:
8686

8787
```ts
8888
/// file: src/app.d.ts
89-
import { KVNamespace, DurableObjectNamespace } from '@cloudflare/workers-types';
89+
+++import { KVNamespace, DurableObjectNamespace } from '@cloudflare/workers-types';+++
9090

9191
declare global {
9292
namespace App {

documentation/docs/25-build-and-deploy/70-adapter-cloudflare-workers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,11 @@ export async function POST({ request, platform }) {
103103

104104
> [!NOTE] SvelteKit's built-in `$env` module should be preferred for environment variables.
105105
106-
To include type declarations for your bindings, reference them in your `src/app.d.ts`:
106+
To make these types available to your app, install `@cloudflare/workers-types` and reference them in your `src/app.d.ts`:
107107

108108
```ts
109109
/// file: src/app.d.ts
110-
import { KVNamespace, DurableObjectNamespace } from '@cloudflare/workers-types';
110+
+++import { KVNamespace, DurableObjectNamespace } from '@cloudflare/workers-types';+++
111111

112112
declare global {
113113
namespace App {

0 commit comments

Comments
 (0)