title: Getting error while calling IO in socket.io-client, angular 8
body: <p>I am calling IO of socket.io-client in my angular project like below:</p>
  <pre><code>import { Injectable } from '@angular/core';
  import { Observable } from 'rxjs/internal/Observable';
  import * as io from 'socket.io-client';
  @Injectable({
    providedIn: 'root'
  })
  export class SocketclientService {
    socket:any;
    url:any=&quot;ws://localhost:8080&quot;
    constructor() {
      this.socket = io(this.url);
     }
     
     listen(eventname:any,data:any){
       return new Observable((subscriber)=&gt;{
         this.socket.on(eventname,(data:any)=&gt;{
           subscriber.next(data);
         })
       })
     }
     emit(eventname:string,data:any){
       this.socket.emit(eventname,data);
     } 
  }
  </code></pre>
  <p>But I am always getting an error like:</p>
  <pre><code> Error: src/app/services/socketclient.service.ts:11:19 - error TS2349: This expression is not callable.
        Type 'typeof import(&quot;C:/somepathtoproject/node_modules/socket.io-client/build/index&quot;)' has no call signatures.
      
      11     this.socket = io(this.url);
                           ~~
  </code></pre>
  <p>I am not getting it why this is showing, even I have installed @types/socket.io-client</p>