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

"@types/ws" not working #41

Open
Xentox-Phil opened this issue Oct 23, 2024 · 1 comment
Open

"@types/ws" not working #41

Xentox-Phil opened this issue Oct 23, 2024 · 1 comment

Comments

@Xentox-Phil
Copy link

When i do this:

import WebSocket from 'ws'

the types are correctly shown in the editor
image

but when i do this:

import WebSocket from "isomorphic-ws"
image

i have no types what so ever.

Does somebody know how to fix this?

@Xentox-Phil
Copy link
Author

Xentox-Phil commented Oct 23, 2024

how i solved it for now is creating a isomorphic-ws.d.ts in my project and declaring the module with the types from the ws library...

But this feels kind of hacky.

Any hint in the right direction would be highly appreciated! ♥

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

No branches or pull requests

1 participant