SIGN IN SIGN UP
socketio / socket.io UNCLAIMED

Realtime application framework (Node.JS server)

0 0 0 TypeScript

fix(eio-client/types): remove ws type from .d.ts file

Before this change, the following error would be thrown when compiling
with TypeScript:

```
node_modules/engine.io-client/build/esm/transports/websocket.node.d.ts:12:101 - error TS1340: Module 'ws' does not refer to a type, but is used as a type here. Did you mean 'typeof import('ws')'?

12     createSocket(uri: string, protocols: string | string[] | undefined, opts: Record<string, any>): import("ws");
                                                                                                       ~~~~~~~~~~~~
```

This behavior was introduced in [1], included in version `6.6.0`.

The return type is forced as `any`, so that the `@types/ws` dependency
is optional.

[1]: https://github.com/socketio/socket.io/commit/f4d898ee9652939a4550a41ac0e8143056154c0a

Related: https://github.com/socketio/socket.io/issues/5202
D
Damien Arrachequesne committed
175a2c58c1bc37eb9b87f87df47e1f9388b01d55
Parent: 9b80ab4