sveltejs / sveltejs/kit

Generate Cloudflare binding types from wrangler.toml

Open
#11,988 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

pkg:adapter-cloudflare types / typescript
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.