Open luisrudge opened 1 week ago
wrangler.toml
[vars] SEND_EMAILS_ENABLED = "false" [env.preview.vars] SEND_EMAILS_ENABLED = "true" [env.production.vars] SEND_EMAILS_ENABLED = "true"
when I run wrangler types, it creates this interface:
wrangler types
interface Env { SEND_EMAILS_ENABLED: "false"; }
which causes a type error because the type is not 'false' | 'true' or even string.
'false' | 'true'
string
So the values need to be generated with all the possible values, and not with only the local value.
cc @andyjessop
Describe the solution
wrangler.toml
when I run
wrangler types
, it creates this interface:which causes a type error because the type is not
'false' | 'true'
or evenstring
.So the values need to be generated with all the possible values, and not with only the local value.