I've updated my TypeScript project from version 2.x to version 3.0.1 of socket.io. After that I cannot compile my project anymore because no type definitions of cors, cookie and component-emitter are known.
After adding them (@types/cors, @types/cookie, @types/component-emitter) to the devDependencies section of my project it works again, but this is neither documented in the migration guide nor feels it like a good solution to add a 3rdParty component and then to get compiler errors because of missing dependencies.
Hmm... according to this, it seems that the types must actually be included in the dependencies
section, and not in the devDependencies
. Let's do this!
This solves the issue for missing typings of cors and cookie, but not for component-emitter, used by package socket.io-parser where @types/component-emitter is included in the devDependencies section only. So, even with socket.io 3.0.3 I got a compiler error because of missing @types/component-emitter. I still have to add this to my own devDependencies section, although this is an implementation detail of socket.io that is nowhere documented.
Most helpful comment
Hmm... according to this, it seems that the types must actually be included in the
dependencies
section, and not in thedevDependencies
. Let's do this!