Skip to content

Migrate all components to TypeScript #80

@daedalist

Description

@daedalist

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

  1. Create type definitions for ghost data (interfaces)
  2. Rename .jsx.tsx and .js.ts
  3. Add type annotations for props and state
  4. Fix any type errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions