Generate Cloudflare binding types from wrangler.toml
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 20.8k
- Forks
- 2.3k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 156
Description
Describe the problem
As suggested by @dario-piotrowicz we want to avoid having to specify the bindings in the wrangler.toml file and again in app.d.ts for the platform.env object.
Describe the proposed solution
We should read the wrangler.toml file and generate the correct types for each binding namespace found in wrangler.toml so the user doesn't have to manually specify them in app.d.ts.
Alternatives considered
No response
Importance
nice to have
Additional Information
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the current platform.env declaration in app.d.ts and any existing integration that reads wrangler.toml. Determine how each binding namespace should map to generated types and how the output is exposed. Done means users no longer duplicate binding declarations in app.d.ts and generated types cover the bindings found in wrangler.toml.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cloud, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100