Updated socket.io to have better function typing on SocketNamespace.on

I also added a test file.