Skip to content

Commit af5a55d

Browse files
add --loose-vars option to wrangler types command
1 parent 18cba31 commit af5a55d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/content/docs/workers/wrangler/commands.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2287,6 +2287,10 @@ The minimum required Wrangler version to use this command is 3.66.0.
22872287
- Leave the path blank to use the default option, e.g. `npx wrangler types --x-include-runtime`
22882288
- A custom path must be relative to the project root, e.g. `./my-runtime-types.d.ts`
22892289
- A custom path must have a `d.ts` extension.
2290+
- `--loose-vars` <Type text="boolean" /> <MetaInfo text="optional (default: false)" />
2291+
- Flag used to generate "loose"/generic types instead of literal and union types for variables (e.g. `myEnv: string` instead of `myEnv: 'my env variable'`)
2292+
- Useful when environment variables can often change (especially with multiple environments involved)
2293+
22902294

22912295
<Render file="wrangler-commands/global-flags" product="workers" />
22922296

0 commit comments

Comments
 (0)