feat(typescript): implement type-safe database error handling and eliminate any types
- Add comprehensive database error interfaces (DatabaseConstraintError, DatabaseStorageError, DexieError) - Implement type guards for database error handling (isDatabaseError, isDatabaseConstraintError, etc.) - Replace any types with proper TypeScript types in ContactsView, ProjectsView, and IdentitySwitcherView - Implement type-safe error handling patterns using new type guards - Fix dynamic property access with keyof operator for type safety Resolves Priority 1 type safety issues in database operations, project management, and identity switching.
This commit is contained in:
@@ -234,7 +234,9 @@ export default class IdentitySwitcherView extends Vue {
|
||||
{
|
||||
did,
|
||||
settingsKeys: Object.keys(newSettings).filter(
|
||||
(k) => (newSettings as any)[k] !== undefined,
|
||||
(k) =>
|
||||
k in newSettings &&
|
||||
newSettings[k as keyof typeof newSettings] !== undefined,
|
||||
),
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user