Skip to content

ConfigSource

ConfigSource = object

Defined in: types.ts:21

A source of raw key/value pairs to merge into the final config.

Sources run in array order; later sources override earlier ones. This matches how environment overrides typically work: defaults < .env file < process.env < remote.

load() returns flat strings — the schema is expected to coerce them via z.coerce.*. For config that is a nested object (module-based config files, arrays, functions), use a StructuredSource instead.

load: () => Record<string, string | undefined> | Promise<Record<string, string | undefined>>

Defined in: types.ts:25

Read raw values. May be sync or async.

Record<string, string | undefined> | Promise<Record<string, string | undefined>>


name: string

Defined in: types.ts:23

Identifier used in diagnostics.