@kekkai/blueprint / readSetting
Function: readSetting()
readSetting(
setting):ReadSetting
Defined in: config/settings.ts:27
Read a setting written either as a bare tier ('error') or as an object ({ tier: 'error', value: 400 }).
One definition rather than a typeof at each use site, and the difference is not only duplication. Written inline, the object arm usually reads the property straight off the setting — typeof s === 'string' ? undefined : s.value — and a string has no .value, so both arms answer undefined and the branch cannot be wrong. Normalising to a shape FIRST puts the tier on the same branch, where getting it wrong is immediately visible.
