I have solved this problem myself. After reading the client socket.io installation page I noticed that to use with NPM you need to use a bundler such as Webpack or Browserify.
I have started using Webpack now and it works a treat, I was avoiding it for a while because I am new to full stack development and wanted to keep it barebones. There was no mention of having to use a bundler on the typescript socket.io page.