Varun Chawla 8b93a18681 fix(sio): allow emitWithAck() for events with void callbacks (#5453)
EventNamesWithAck previously excluded events whose callback had no
non-error arguments (e.g. `(cb: () => void) => void` or
`(cb: (err: Error) => void) => void`). This made it impossible to use
emitWithAck as a simple acknowledgement mechanism without data.

The fix removes the FirstNonErrorArg void check while keeping the guard
against events with no parameters at all, so events like `() => void`
(no callback) are still correctly excluded.

Related: https://github.com/socketio/socket.io/issues/5257
2026-03-17 18:56:40 +01:00
2025-12-15 08:55:26 +01:00
2025-12-22 13:45:36 +01:00

socket.io

Latest NPM version Build status Downloads per month

Getting Started

Please check our documentation here.

Questions

Our issues list is exclusively reserved for bug reports and feature requests. For usage questions, please use the following resources:

Security

If you think that you have found a security vulnerability in our project, please do not create an issue in this GitHub repository, but rather refer to our Security Policy.

Issues and contribution

Please make sure to read our Contributing Guide before creating an issue or making a pull request.

Thanks to everyone who has already contributed to Socket.IO!

License

MIT

Description
No description provided
Readme MIT 43 MiB
Languages
TypeScript 63.8%
JavaScript 36%