-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
effort: mediumHalf day to full dayHalf day to full daypriority: mediumNormal priorityNormal prioritytype: tech-debtTechnical debt to addressTechnical debt to address
Description
Summary
Several result types use { success: boolean; error?: string } pattern which allows invalid states (success=true with error message).
Current State
VodSyncResultindb/sync.ts- Various hook return types
Proposed Solution
type SyncResult =
| { success: true; movieCount: number; seriesCount: number; /* ... */ }
| { success: false; error: string };Benefits
- Invalid states become unrepresentable
- Better TypeScript inference
- Clearer error handling at call sites
From PR #6 Review
Type design synthesis rated overall type safety at 5.9/10, with discriminated unions as key improvement area.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
effort: mediumHalf day to full dayHalf day to full daypriority: mediumNormal priorityNormal prioritytype: tech-debtTechnical debt to addressTechnical debt to address