-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Problem
Many components use as any type assertions which bypass TypeScript's type checking and can hide bugs. These should be replaced with proper type definitions.
What to do
- Search for all
as anyinweb/src/(excluding test files) - For each occurrence, determine the actual type and replace the assertion
- If a proper type doesn't exist yet, create an interface or type alias
- Common patterns to fix:
- Event handlers:
as any→as React.MouseEvent<HTMLButtonElement> - Store selectors:
as any→ proper state type - API responses:
as any→ response interface - Theme access:
as any→as Theme
- Event handlers:
Important
- Do NOT just replace
as anywithas unknown— that's equally bad - If you truly cannot determine the type, use a specific comment explaining why
- Run
npm run typecheckto verify your changes compile
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request