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
Not shown, I also have my own SocketEvent enums for my custom events. Those do not have this error.
Those three cause this error:
pages/find.tsx:68:43 - error TS2345: Argument of type '(reason: string) => void' is not assignable to parameter of type 'never'.
68 socket.on(SocketEvent.DISCONNECT, (reason: string) => {
~~~~~~~~~~~~~~~~~~~~~
utils/useRocketcrabClientSocket.ts:29:40 - error TS2345: Argument of type '() => void' is not assignable to parameter of type 'never'.
29 socket.on(SocketEvent.CONNECT, () => setSocketConnected(true));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
utils/useRocketcrabClientSocket.ts:49:43 - error TS2345: Argument of type '(reason: any) => void' is not assignable to parameter of type 'never'.
49 socket.on(SocketEvent.DISCONNECT, (reason) => {
~~~~~~~~~~~~~
utils/useRocketcrabClientSocket.ts:74:45 - error TS2345: Argument of type '() => void' is not assignable to parameter of type 'never'.
74 socket.io.on(SocketEvent.RECONNECT, () => {
To Reproduce
Use an enum with the string for the default events.
Socket.IO server version: 4.0.1
Expected behavior
A clear and concise description of what you expected to happen.
Platform:
Win 10, Node 14, Typescript 4.2.4
The text was updated successfully, but these errors were encountered:
Describe the bug
I'm using Typescript enums for my socket events. I made my own for
connect
,disconnect
, etc. like this:Not shown, I also have my own SocketEvent enums for my custom events. Those do not have this error.
Those three cause this error:
To Reproduce
Use an enum with the string for the default events.
Socket.IO server version:
4.0.1
Expected behavior
A clear and concise description of what you expected to happen.
Platform:
Win 10, Node 14, Typescript 4.2.4
The text was updated successfully, but these errors were encountered: