Replace any types with proper TypeScript types and generics
Introduce type safety in {{AREA}}:
Current issues:
{{TYPE_ISSUES}}
Approach:
1. Find all 'any' type usages
2. Analyze the actual data shapes
3. Create proper interfaces/types
4. Replace 'any' with specific types
5. Add generic types where appropriate
6. Enable stricter TypeScript config options
7. Run type check to verify
Common patterns to fix:
- API response types
- Event handler types
- Component prop types
- State management types
- Database query result types
Provide:
- TypeScript interfaces for all data shapes
- Updated code with proper types
- tsconfig.json strict mode settings
- Type guard utilities if needed
- Migration guide for existing codeImproving type safety in TypeScript projects