I usually used to do something like socket.username = username when not using typescript. But now i am and when i try to save it the same way it gives me the error
Property 'username' does not exist on type 'Socket'
I know this means i need to extend it, but i have tried it like so
interface Socket {
username: any
}
But it did not help and i also tried this,
interface SocketIO {
username: any
}
With no luck.