Files
socket.io/packages
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
..
2026-03-10 10:52:10 +01:00