fix: resolve TypeScript type errors (partial fix for #49) #51

Merged
jonas.hanisch merged 1 commit from fix/typescript-errors-49 into main 2026-01-22 11:35:24 +00:00
Owner

Summary

  • Add bun:sqlite type declarations stub
  • Extend Component type with all missing logger component values
  • Fix missing homedir import in CursorHooksInstaller.ts
  • Add context property to HookResult type
  • Add USER_MESSAGE_ONLY to HOOK_EXIT_CODES
  • Fix sqlite-compat.js import (use bun:sqlite directly)
  • Fix MCP tool result typing in ChromaSync
  • Update OpenRouter SDK API naming (snake_case to camelCase)
  • Add EventType import and cast in hook-command.ts

Remaining Work

~263 type errors remain, mostly due to Bun SQLite's strict typing where query().all() returns unknown[]. This requires a larger refactoring effort to add type assertions across all database queries.

Test plan

  • Build still works
  • Full typecheck passes (pending additional work)

Partially addresses #49

## Summary - Add bun:sqlite type declarations stub - Extend Component type with all missing logger component values - Fix missing homedir import in CursorHooksInstaller.ts - Add context property to HookResult type - Add USER_MESSAGE_ONLY to HOOK_EXIT_CODES - Fix sqlite-compat.js import (use bun:sqlite directly) - Fix MCP tool result typing in ChromaSync - Update OpenRouter SDK API naming (snake_case to camelCase) - Add EventType import and cast in hook-command.ts ## Remaining Work ~263 type errors remain, mostly due to Bun SQLite's strict typing where `query().all()` returns `unknown[]`. This requires a larger refactoring effort to add type assertions across all database queries. ## Test plan - [x] Build still works - [ ] Full typecheck passes (pending additional work) Partially addresses #49
fix: resolve TypeScript type errors (partial fix for #49)
All checks were successful
CI / build (pull_request) Successful in 17s
CI / validate-plugin (pull_request) Successful in 2s
bf96e564ab
- Add bun:sqlite type declarations stub
- Extend Component type with all missing values (CURSOR, CHROMA_SYNC,
  QUEUE, CONSOLE, IMPORT, EMBEDDING, VECTOR_SYNC, QDRANT_SYNC, BRANCH,
  SEARCH, CONFIG, MEMORY, PROJECT, PROJECT_NAME, SECURITY, SETTINGS,
  SUBSCRIPTION, VECTOR, VIEWER)
- Fix missing homedir import in CursorHooksInstaller.ts
- Add context property to HookResult type
- Add USER_MESSAGE_ONLY to HOOK_EXIT_CODES
- Fix sqlite-compat.js import (use bun:sqlite directly)
- Fix MCP tool result typing in ChromaSync
- Update OpenRouter SDK API: max_tokens -> maxTokens,
  total_tokens -> totalTokens, etc.
- Add EventType import and cast in hook-command.ts

Note: ~263 type errors remain, mostly due to Bun SQLite's strict
typing where query().all() returns unknown[]. This requires a larger
refactoring effort to add type assertions across all database queries.

Closes #49 (partial)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
jonas.hanisch deleted branch fix/typescript-errors-49 2026-01-22 11:35:24 +00:00
Sign in to join this conversation.
No description provided.