Skip to content

Weird types in middleware #4948

Closed Answered by MalekD5
MalekD5 asked this question in Q&A
Feb 13, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Hi, as it turns out I was incorrectly inferring the types by using Socket type instead of Server type. This confusion was related to nestjs websocket package that was using the type any for the lifecycle hooks (afterInit to be precise) not realizing that the parameter was referring to a server rather than a client (Socket).

I think I should have been asking for support directly from nestjs rather than socket.io
My apologies.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@MalekD5
Comment options

Answer selected by MalekD5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants