(value: unknown)
| 175 | } |
| 176 | |
| 177 | function normalizeFolderColors(value: unknown): Record<string, FolderColorId> { |
| 178 | const out: Record<string, FolderColorId> = {} |
| 179 | if (value && typeof value === 'object') { |
| 180 | for (const [key, colorId] of Object.entries(value as Record<string, unknown>)) { |
| 181 | if (!key || !isFolderColorId(colorId)) continue |
| 182 | out[key] = colorId |
| 183 | } |
| 184 | } |
| 185 | return out |
| 186 | } |
| 187 | |
| 188 | const DEFAULT_VAULT_SETTINGS: VaultSettings = { |
| 189 | primaryNotesLocation: 'inbox', |
no test coverage detected