Skip to content

Commit 9c5eac5

Browse files
committed
docs: note that blob-based language codegens are unaffected by @injectUndefinedAsEmpty
1 parent 823e159 commit 9c5eac5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/varlock-website/src/content/docs/reference/root-decorators.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ OPTIONAL_VAR= # @optional
482482
Generated TypeScript types reflect this: when enabled, the `process.env` and `import.meta.env` augmentations from [`@generateTsTypes`](#generatetstypes) mark every schema key as always present, since unset items are injected as `""`. An optional string types as `string` instead of `string | undefined`, and literal-typed items keep their unions with `""` added (an optional `enum(alpha, beta)` becomes `"alpha" | "beta" | ""`).
483483

484484
:::note
485-
The `ENV` proxy is unaffected: `ENV.OPTIONAL_VAR` always returns the real resolved value (`undefined` when unset), regardless of this setting, and its generated types keep optional keys optional.
485+
The `ENV` proxy is unaffected: `ENV.OPTIONAL_VAR` always returns the real resolved value (`undefined` when unset), regardless of this setting, and its generated types keep optional keys optional. The same goes for the other language generators (`@generatePythonEnv`, `@generateGoEnv`, etc.): their loaders parse the `__VARLOCK_ENV` blob into coerced values, so unset items stay absent/`None`/`Option::None` rather than becoming empty strings.
486486
:::
487487
</div>
488488

0 commit comments

Comments
 (0)