title: Typescript returning Argument of type 'void' is not assignable to parameter of type 'TimerHandler?
body: <p>I want to update the count of number of message received by use on live server in angular 7 like we have in facebook and linkedin on main page and i have tried the following code:-</p>
  
  <p>the code to fetch message:-</p>
  
  <pre><code>getMessageCount(rid:any)
      {
        return this.http.get&lt;any&gt;(this.apiUrl+'message/'+rid);
      }
  on the main page we have the following code run like this :-
  export class HomeComponent implements OnInit {
     userAuthenticated=false;
     private tmessage:any;
    constructor(private service:LoginService,private mService:MessagingService) {
      if(this.service.currentUserValue)
      {
        this.userAuthenticated=true;
        const id=this.service.currentUserValue.id;
        window.setInterval(this.getMessages(id),5);
  
      }
    }
  }
  </code></pre>
  
  <p>upon sending the new message it should be updated without reloading the page ,can anybody tell me what i can do to achieve it ?</p>