socketio / socket.io-cluster-adapter

The Socket.IO official cluster adapter, allowing to broadcast events between several Socket.IO servers.
https://socket.io
MIT License
16 stars 9 forks source link

Cluster Adapter Type is not compatible with io adapter #12

Open SlmnFz opened 7 months ago

SlmnFz commented 7 months ago

Im using Express.js and socket.io/pm2 + typescript.

const clusterAdapter = createAdapter()(nsp); io.adapter(clusterAdapter); setupWorker(io);

io.adapter accepts AdapterConstructor the error:

Argument of type 'ClusterAdapter' is not assignable to parameter of type 'AdapterConstructor'. Type 'ClusterAdapter' is missing the following properties from type 'typeof Adapter': prototype, getEventListeners, addAbortListener, errorMonitor, and 5 more