socket.io-cluster-adapter
socket.io-cluster-adapter copied to clipboard
Cluster Adapter Type is not compatible with io adapter
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