Skip to content

Commit 60ddd7e

Browse files
fixup! add --loose-vars option to wrangler types command
rename `--loose-vars` to `--strict-vars`
1 parent af5a55d commit 60ddd7e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2287,10 +2287,9 @@ 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-
2290+
- `--strict-vars` <Type text="boolean" /> <MetaInfo text="optional (default: true)" />
2291+
- Flag to opt out of the default generation of literal and union types for variables in favour of more generic types (e.g. to generate `myEnv: string` instead of `myEnv: 'my env variable'`)
2292+
- Useful when environment variables can often change (especially with multiple environments are involved)
22942293

22952294
<Render file="wrangler-commands/global-flags" product="workers" />
22962295

0 commit comments

Comments
 (0)