Skip to content

Conversation

@zanesq
Copy link
Collaborator

@zanesq zanesq commented May 28, 2025

  • Fix unused parameters by prefixing with underscore (TypeScript convention):

    • ProviderSetupModal.tsx: _model: _, _endpoint: __
    • OllamaBattleGame.tsx: requiredKeys: _ (with comprehensive fixes)
    • AddModelModal.tsx: _isValid: _, _validationErrors: __
    • main.ts: Multiple unused event parameters → _event, version → _version
  • Fix OllamaBattleGame.tsx completely:

    • Remove unused React import
    • Fix Audio type from custom to HTMLAudioElement
    • Fix computed property with null check for configKey
    • Fix function type casting for choices array/function
    • Add comprehensive asset type declarations (PNG, MP3, etc.)
  • Reduces TypeScript errors by ~20 (from 381 to 361)

  • All changes use TypeScript conventions for intentionally unused parameters

  • No functionality changes, purely cleanup and type safety improvements

- Fix unused parameters by prefixing with underscore (TypeScript convention):
  - ProviderSetupModal.tsx: _model: _, _endpoint: __
  - OllamaBattleGame.tsx: requiredKeys: _ (with comprehensive fixes)
  - AddModelModal.tsx: _isValid: _, _validationErrors: __
  - main.ts: Multiple unused event parameters → _event, version → _version

- Fix OllamaBattleGame.tsx completely:
  - Remove unused React import
  - Fix Audio type from custom to HTMLAudioElement
  - Fix computed property with null check for configKey
  - Fix function type casting for choices array/function
  - Add comprehensive asset type declarations (PNG, MP3, etc.)

- Reduces TypeScript errors by ~20 (from 381 to 361)
- All changes use TypeScript conventions for intentionally unused parameters
- No functionality changes, purely cleanup and type safety improvements
@zanesq zanesq requested a review from alexhancock May 28, 2025 22:01
@zanesq zanesq merged commit bfc11f0 into fix/typescript-errors-phase1-unused-react-imports May 29, 2025
1 check passed
@zanesq zanesq deleted the fix/typescript-errors-phase2-unused-variables branch May 29, 2025 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants