socket.io-client typescript error #4224
-
Hello, I am starting a new project with socketio-client. I use the version 4.4.0 but I have troubles with Typescript. When I try to use Property 'on' does not exist on type 'Socket<DefaultEventsMap, DefaultEventsMap>'.ts(2339) How can I do to be able to use the on function on my socket? I tried the Typescript definition but it did not change anything. Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi! That's weird, are you able to reliably reproduce? Could you please check with the example there? See also: https://socket.io/docs/v4/typescript/ |
Beta Was this translation helpful? Give feedback.
-
Hello, |
Beta Was this translation helpful? Give feedback.
Hi! That's weird, are you able to reliably reproduce? Could you please check with the example there?
See also: https://socket.io/docs/v4/typescript/