VarBindingDef
VarBindingDef =
object
Defined in: packages/env/src/types.ts:84
Binding definition for a var (string environment variable).
Supports optional defaults (simple string or per-environment) and an optional validation callback.
Example
Section titled “Example”const schema = { APP_URL: { type: "var" as const, default: "http://localhost:8787", validate: (v: string) => v.startsWith("http"), },};Properties
Section titled “Properties”default?
Section titled “default?”
optionaldefault:string|EnvironmentDefaults
Defined in: packages/env/src/types.ts:88
Default value: a simple string, or a per-environment EnvironmentDefaults map.
type:
"var"
Defined in: packages/env/src/types.ts:86
Must be "var" to identify this as a string variable binding.
validate()?
Section titled “validate()?”
optionalvalidate: (value) =>boolean
Defined in: packages/env/src/types.ts:90
Optional validation callback. Return true to accept, false to reject.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”boolean