(value: unknown)
| 328 | } |
| 329 | |
| 330 | function normalizePanelWidths(value: unknown): PanelWidths { |
| 331 | const v = (value ?? {}) as Partial<Record<RightPanelId, unknown>> |
| 332 | const pick = (key: RightPanelId): number => |
| 333 | typeof v[key] === 'number' ? clampPanelWidth(v[key] as number) : DEFAULT_PANEL_WIDTHS[key] |
| 334 | return { |
| 335 | outline: pick('outline'), |
| 336 | connections: pick('connections'), |
| 337 | comments: pick('comments'), |
| 338 | calendar: pick('calendar') |
| 339 | } |
| 340 | } |
| 341 | |
| 342 | interface Prefs { |
| 343 | vimMode: boolean |
no test coverage detected