Function: flagsThenEnv()
function flagsThenEnv(
flags,
prefix,
get): ConfigSource;
Defined in: packages/overcast-core/src/config-schema.ts:293
Values from parsed CLI flags first, then the environment under prefix — the
precedence a command line has: what was typed beats what was exported.
flags is keyed as a flag parser hands it back (camelCase, so --core-address
is coreAddress), which is derived from the field's own ConfigMeta.flag or, failing that, its ConfigMeta.env suffix. Values
are coerced to strings because a numeric flag may arrive already parsed from a
programmatic caller, and 0 must still read as supplied.
Parameters
| Parameter | Type |
|---|---|
flags | Record<string, unknown> |
prefix | string |
get | (key) => string | undefined |