Function: settingsToRecord()
settingsToRecord(
settings
:SettingRow
[]):Record
<string
,string
>
Defined in: electron/services/database/utils/settingsMapper.ts:190
Convert SettingRow array to a Record object mapping keys to values.
Parameters
settings
Array of SettingRow objects
Returns
Record
<string
, string
>
Record mapping keys to values
Remarks
Validation: Uses type-specific validation to ensure data integrity without awkward type casting.
Duplicate Key Handling: If multiple settings have the same key, the last occurrence will be used. This follows JavaScript object property assignment semantics.
Type Safety: Uses proper SettingRow validation instead of casting to generic Record type for better type safety.