Commit 0ace55d
committed
Fix CI: declare Cloudflare.Env so astro check passes without wrangler types
The cloudflare:workers module types `env` as `Cloudflare.Env`, which is
populated by `wrangler types` into the gitignored `worker-configuration.d.ts`.
CI doesn't have that file, so `Env` was empty and `env.WAITLIST` failed type
checking. Previous `declare module 'cloudflare:workers'` augmentation was a
no-op because the module uses `export =` (CommonJS).
Declaring `Cloudflare.Env` directly mirrors what wrangler generates and lets
TS merge both declarations locally while keeping CI green.1 parent c1fd856 commit 0ace55d
1 file changed
Lines changed: 11 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
11 | 12 | | |
| 13 | + | |
| 14 | + | |
0 commit comments