Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exec type is wrong #1662

Closed
hax opened this issue Apr 25, 2024 · 0 comments · Fixed by #1665
Closed

exec type is wrong #1662

hax opened this issue Apr 25, 2024 · 0 comments · Fixed by #1665

Comments

@hax
Copy link

hax commented Apr 25, 2024

Describe the bug

exec method on Exec class returns Promise<WebSocket>.

As the source code, WebSocket is imported as import WebSocket = require('isomorphic-ws');. Unfortunately, such WebSocket is the module value, not the type, the correct type should be WebSocket.WebSocket. So the result WebSocket type actually fallback to globalThis.WebSocket (from DOM or node type definitions as user's tsconfig) , which is not compatible with ws on node env.

mstruebing added a commit to mstruebing/javascript that referenced this issue Apr 27, 2024
mstruebing added a commit to mstruebing/javascript that referenced this issue Apr 27, 2024
mstruebing added a commit to mstruebing/javascript that referenced this issue Apr 27, 2024
mstruebing added a commit to mstruebing/javascript that referenced this issue Apr 27, 2024
mstruebing added a commit to mstruebing/javascript that referenced this issue Apr 27, 2024
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 a pull request may close this issue.

1 participant