-
Notifications
You must be signed in to change notification settings - Fork 757
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🚀 Feature Request: wrangler types
generates wider types for environment variables
#5082
Comments
@mw10013 thanks for the issue 🙂 I've opened a PR to hopefully address this: #5086 With my changes if you have your variable defined in multiple environments in your config file and run PS: you can try seeing if the PR's prerelease works for you by running: npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8032131415/npm-package-wrangler-5086 types |
@dario-piotrowicz : I tried the PR prerelease and it works perfectly for my use case. World class typing. Thanks! |
@mw10013 great! 🚀 thanks for giving it a try! 😄 |
Did this ever get resolved? |
Describe the solution
wrangler types
seems to generate literals for environment variables inwrangler.toml
. A wider type likestring
may be more helpful.generates
Typescript then complains when I try to compare ENVIRONMENT against, say, 'production'.
The text was updated successfully, but these errors were encountered: