luixaviles / socket-io-typescript-chat

A chat application implemented using Socket.io, TypeScript, Angular and Angular Material components

Home Page:https://medium.com/dailyjs/real-time-apps-with-typescript-integrating-web-sockets-node-angular-e2b57cbd1ec1

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

what is the type of socket

ORESoftware opened this issue · comments

I spy an unnecessary use of any

           this.io.on('connect', (socket: any) => {
            console.log('Connected client on port %s.', this.port);
            socket.on('message', (m: Message) => {
                console.log('[server](message): %s', JSON.stringify(m));
                this.io.emit('message', m);
            });

            socket.on('disconnect', () => {
                console.log('Client disconnected');
            });

what is socket?? what is the type? I can't find that info.. if I find out, I would like submit a PR for this lib if that's ok

I think the type is:

import {Socket} from "socket.io";