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
{{ message }}
Repository navigation
SocketData type is not passed down to the Namespace #4229
@darrachequesne When making RemoteSocket.data type safe, should BroadcastOperator<EmitEvents> also change to BroadcastOperator<EmitEvents, SocketData>? I ask because BroadcastOperator.fetchSockets is the method that returns RemoteSocket.
There are 2 options:
Make BroadcastOperator like BroadcastOperator<EmitEvents, SocketData = any>.
Activity
OrkhanAlikhanov commentedon Jan 1, 2022
Also it would be nice to have
RemoteSocket.datatype safe. Right now it defaults toanydarrachequesne commentedon Jan 1, 2022
@OrkhanAlikhanov that's a great idea! Would you have the time to open a pull request?
OrkhanAlikhanov commentedon Jan 3, 2022
@darrachequesne When making
RemoteSocket.datatype safe, shouldBroadcastOperator<EmitEvents>also change toBroadcastOperator<EmitEvents, SocketData>? I ask becauseBroadcastOperator.fetchSocketsis the method that returnsRemoteSocket.There are 2 options:
BroadcastOperatorlikeBroadcastOperator<EmitEvents, SocketData = any>.fetchSocketsmethod signature:I think it's better to go with second option. I don't see need to pass
SocketDataaroundBroadcastOperatorfix(typings): pass `SocketData` type to custom namespaces (#4233)
fix(types): make `RemoteSocket.data` type safe (#4234)
fix(typings): pass `SocketData` type to custom namespaces (socketio#4233
fix(types): make `RemoteSocket.data` type safe (socketio#4234)