-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SocketData
type is not passed down to the Namespace
#4229
Comments
Also it would be nice to have |
@OrkhanAlikhanov that's a great idea! Would you have the time to open a pull request? |
@darrachequesne When making There are 2 options:
//from
fetchSockets(): Promise<RemoteSocket<EmitEvents>[]>
// to
fetchSockets<SocketData = any>(): Promise<RemoteSocket<EmitEvents, SocketData>[]> I think it's better to go with second option. I don't see need to pass |
) The `SocketData` type was only available on the main namespace. Related: socketio#4229 See also: socketio@5d78eac
SocketData
type is not passed down to theNamespace
when we doio.of()
.That results in
socket.data
beingany
type:Example:
Source code:
socket.io/lib/index.ts
Lines 577 to 582 in 51784d0
Should be:
The text was updated successfully, but these errors were encountered: