You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
emitWithAck doesn't seem to be picking up types correctly, so the type variable Ev is assigned never.
To Reproduce
Socket.IO server version: 4.8.1
Server
import{Server}from"socket.io";interfaceServerToClientEvents{someEvent: (callback: (err: Error)=>void)=>void;}interfaceClientToServerEvents{}constio=newServer<ClientToServerEvents,ServerToClientEvents>();io.on("connection",async(socket)=>{// Typescript gives error "Argument of type 'string' is not assignable to parameter of type 'never'.ts(2345)"awaitsocket.emitWithAck("someEvent");// No errorsocket.emit("someEvent",(err)=>{});});
Client
No client code necessary.
Expected behavior
No Typescript error (similar to emit behavior)
Platform:
Device: Macbook Air M2
OS: MacOS Sonoma 14.6.1
Additional context
Seems to be the same bug as mentioned in the comment #4925 (comment), but different from that issue.
The text was updated successfully, but these errors were encountered:
Describe the bug
emitWithAck
doesn't seem to be picking up types correctly, so the type variableEv
is assignednever
.To Reproduce
Socket.IO server version:
4.8.1
Server
Client
No client code necessary.
Expected behavior
No Typescript error (similar to
emit
behavior)Platform:
Additional context
Seems to be the same bug as mentioned in the comment #4925 (comment), but different from that issue.
The text was updated successfully, but these errors were encountered: