cloudflare / cloudflare/workers-sdk
wrangler types should include module declarations for default rules
- Dominant language
- TypeScript
- Stars
- 4.5k
- Forks
- 1.5k
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 187
Description
### Which Cloudflare product(s) does this pertain to?
Wrangler
### What versions & operating system are you using?
Wrangler v4.10.0
### Please provide a link to a minimal reproduction
_No response_
### Describe the Bug
`wrangler types` should produce a `worker-configuration.d.ts` which has the module declarations for the default rules. For example:
```ts
declare module "*.html" {
const value: string;
export default value;
}
```
Right now, these are only being generated if I explicitly add them to my `wrangler.toml`:
```toml
[[rules]]
type = "Text"
globs = ["**/*.html"]
```
I shouldn't need to do that.
### Please provide any relevant error logs
_No response_
Contributor guide
Research direction
Start at the Wrangler `types` command and the code that generates `worker-configuration.d.ts`; compare default rule handling with explicit `wrangler.toml` rules. Run `wrangler types` without a custom rule and confirm that the generated output includes default module declarations such as `*.html`.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100