Skip to content

Conversation

@steveluc
Copy link
Contributor

Summary

  • Fix TypeScript compilation errors in agent-server-client caused by invalid type imports
  • Use namespaced WebSocket types instead of importing directly from isomorphic-ws

Details

The isomorphic-ws package doesn't actually export MessageEvent, CloseEvent, or ErrorEvent types. It only re-exports the WebSocket class from the ws package. The event types are defined in the WebSocket namespace via @types/ws.

Changes:

  • Removed invalid imports: type MessageEvent, type CloseEvent, type ErrorEvent from isomorphic-ws
  • Updated event handler type annotations to use:
    • WebSocket.MessageEvent
    • WebSocket.CloseEvent
    • WebSocket.ErrorEvent

Fixes these TypeScript compilation errors:

error TS2305: Module '"isomorphic-ws"' has no exported member 'MessageEvent'
error TS2305: Module '"isomorphic-ws"' has no exported member 'CloseEvent'
error TS2305: Module '"isomorphic-ws"' has no exported member 'ErrorEvent'

Test plan

  • TypeScript compilation passes: pnpm exec tsc -b in agent-server-client package
  • Full project build succeeds: pnpm build

🤖 Generated with Claude Code

The isomorphic-ws package doesn't export MessageEvent, CloseEvent, or
ErrorEvent types. These types are defined in the WebSocket namespace
via @types/ws. Updated to use the namespaced types (WebSocket.MessageEvent,
WebSocket.CloseEvent, WebSocket.ErrorEvent) instead of trying to import
them directly from isomorphic-ws.

This resolves TypeScript compilation errors:
- TS2305: Module '"isomorphic-ws"' has no exported member 'MessageEvent'
- TS2305: Module '"isomorphic-ws"' has no exported member 'CloseEvent'
- TS2305: Module '"isomorphic-ws"' has no exported member 'ErrorEvent'

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@steveluc steveluc temporarily deployed to development-fork January 26, 2026 06:22 — with GitHub Actions Inactive
@steveluc steveluc deployed to development-fork January 26, 2026 06:22 — with GitHub Actions Active
@steveluc steveluc added this pull request to the merge queue Jan 26, 2026
Merged via the queue into main with commit 9200f3a Jan 26, 2026
21 checks passed
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.

2 participants