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
writeToEngine is referenced at lines 193 where it is passed an argument of type any[], and at 196 where it is apssed an argument of type Packet. The inner function body of writeToEngine seems to expect to be passed Packet[]. Could you explain how this is working? If it just comes down to fixing type annotations, I would be happy to submit a PR for it once I understand the intended behaviour.
To Reproduce
Socket.IO server version: 3.1.0
The text was updated successfully, but these errors were encountered:
A few notes:
- only the first element is pre-encoded, because the other elements are
buffers and will be sent as is over the WebSocket connection
- using `socket.packet()` was unexpectedly working, we will now use
`socket.client.writeToEngine()` (see [1])
See also: socketio/engine.io@7706b12
[1]: socketio/socket.io#3775
Describe the bug
I do not know if this is a bug. I came across some code that doesn't seem to make sense from a typings point of view:
https://github.com/socketio/socket.io/blob/master/lib/client.ts#L182
writeToEngine
is referenced at lines 193 where it is passed an argument of typeany[]
, and at 196 where it is apssed an argument of typePacket
. The inner function body ofwriteToEngine
seems to expect to be passedPacket[]
. Could you explain how this is working? If it just comes down to fixing type annotations, I would be happy to submit a PR for it once I understand the intended behaviour.To Reproduce
Socket.IO server version:
3.1.0
The text was updated successfully, but these errors were encountered: