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
When using @Argsdecorators in the listeners from @tsed/socketio, the ACK callbacks are mistakenly passed to the deserialise function, which leads to a failure. The current implementation tries to deserialize callback functions when they are passed as arguments, which is not the appropriate behavior.
To Reproduce
Create a socket service with an input event that expects a callback function.
Define the callback function as an argument to the event.
Trigger the event and observe that the service attempts to deserialize the callback function, resulting in an error.
// server.ts
@SocketService("/room")exportclassTestService{
@Input("eventName")event(@Args(0)callback: ()=>void){// throws an errorcallback();}}// client.tsconstsocket=io("/room")awaitsocket.emitWithAck('eventName')// will never fulfilled
Expected behavior
The callback function should be passed through without any attempt at deserialization.
Actual behavior
The callback function is incorrectly processed by the deserialization function, which results in a error
Repository URL example
No response
OS
macOs
Node version
Node v20
Library version
v7.67.8
Additional context
No response
The text was updated successfully, but these errors were encountered:
Describe the bug
When using
@Args
decorators in the listeners from@tsed/socketio
, the ACK callbacks are mistakenly passed to thedeserialise
function, which leads to a failure. The current implementation tries to deserialize callback functions when they are passed as arguments, which is not the appropriate behavior.To Reproduce
Expected behavior
The callback function should be passed through without any attempt at deserialization.
Actual behavior
The callback function is incorrectly processed by the deserialization function, which results in a error
Repository URL example
No response
OS
macOs
Node version
Node v20
Library version
v7.67.8
Additional context
No response
The text was updated successfully, but these errors were encountered: