-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Description
Description
Replaced all problematic any types with proper TypeScript types to improve type safety, developer experience, and code maintainability across the codebase.
Files Changed
Created
- ✨
components/roadmap/types.ts- Shared type definitions for roadmap components
Modified
- 📝
components/helpers/applyFilter.ts- Removedanyfrom type guards, added proper type checking - 📝
components/roadmap/RoadmapItem.tsx- Replaced local interface with shared type - 📝
components/roadmap/RoadmapColumn.tsx- Updateditemsprop type fromany[]toRoadmapItem[] - 📝
components/roadmap/RoadmapList.tsx- Replaced inline type with sharedRoadmapItemtype - 📝
components/roadmap/RoadmapPill.tsx- Updateddescriptionto supportReact.ReactNode - 📝
components/navigation/Filter.tsx- Made component generic, improved internal type safety - 📝
components/CaseTOC.tsx- AddedTocSectioninterface, replacedany[]in props - 📝
pages/roadmap.tsx- UpdatedRoadmapDatainterface to useRoadmapItem[]
Total: 1 file created, 8 files modified
Benefits
✅ Type Safety - Catches errors at compile time
✅ IntelliSense - Better IDE autocomplete and hints
✅ Refactoring Safety - Changes show errors across all usages
✅ Documentation - Types serve as inline documentation
✅ Runtime Safety - Type guards prevent runtime errors
Testing
- ✅
npx tsc --noEmitpasses with 0 errors - ✅ No linter errors in any modified files
- ✅ All existing functionality preserved
- ✅ No breaking changes to component APIs
This PR eliminates technical debt and improves code quality without changing any functionality.
Metadata
Metadata
Assignees
Labels
No labels