Effort: Medium (2-4 hours)
Impact: Full type safety across codebase
Phase: Long-Term
Current State
Components use .jsx and .js, while app files use .tsx
Files to migrate
src/components/Header.jsx
src/components/CandidateList.jsx
src/components/Ghostbook.jsx
src/components/Ghost.jsx
src/components/ObservationList.jsx
src/lib/evidenceState.js
src/lib/evidence.js
Pros
- Better type safety and IntelliSense
- Catch bugs at compile time
- Consistent codebase (currently mixed)
- Easier refactoring
Cons
- Initial time investment to add types
- May need to define interfaces for ghost data
Risks
Low - TypeScript already configured, just need to rename and add types
Implementation
- Create type definitions for ghost data (interfaces)
- Rename
.jsx → .tsx and .js → .ts
- Add type annotations for props and state
- Fix any type errors
Effort: Medium (2-4 hours)
Impact: Full type safety across codebase
Phase: Long-Term
Current State
Components use
.jsxand.js, while app files use.tsxFiles to migrate
src/components/Header.jsxsrc/components/CandidateList.jsxsrc/components/Ghostbook.jsxsrc/components/Ghost.jsxsrc/components/ObservationList.jsxsrc/lib/evidenceState.jssrc/lib/evidence.jsPros
Cons
Risks
Low - TypeScript already configured, just need to rename and add types
Implementation
.jsx→.tsxand.js→.ts