You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/workers/framework-guides/web-apps/vike.mdx
+29Lines changed: 29 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -211,3 +211,32 @@ declare global {
211
211
> args="--react --hono --drizzle --cloudflare"
212
212
> />
213
213
> Or go to [vike.dev/new](https://vike.dev/new) and select `Cloudflare` with an ORM.
214
+
215
+
216
+
## TypeScript
217
+
218
+
If you use TypeScript, (re-)run [`wrangler types`](https://developers.cloudflare.com/workers/wrangler/commands/#types) after changing your Cloudflare configuration to generate/update the `worker-configuration.d.ts` file.
219
+
220
+
<PackageManagers
221
+
type="exec"
222
+
pkg="wrangler"
223
+
args="types"
224
+
/>
225
+
226
+
Then commit it:
227
+
228
+
```bash
229
+
git commit -am "update cloudflare types"
230
+
```
231
+
232
+
Make sure TypeScript loads it:
233
+
234
+
```diff lang=json title="tsconfig.json"
235
+
{
236
+
"compilerOptions": {
237
+
+ "types": ["./worker-configuration.d.ts"],
238
+
}
239
+
}
240
+
```
241
+
242
+
See also: [Cloudflare Workers > TypeScript](https://developers.cloudflare.com/workers/languages/typescript/)
0 commit comments