title: Unable to compile TypeScript - No overload matches this call
body: <p>I am using using typescript with NodeJS and express.</p>
  <pre><code>    this.app.listen(port, (err: any) =&gt; {
        if (err) {
          console.log(&quot;err&quot;, err)
        } else {
          console.log(`Server is listing on port ${port}`);
        }
      });
  </code></pre>
  <p>They above code gives me error in visual studio code and also when i try to compile typescript. I am getting the following error message when i try to compile the typescript.</p>
  <blockquote>
  <p>No overload matches this call.
  The last overload gave the following error.</p>
  <p>Argument of type '(err: any) =&gt; void' is not assignable to parameter of type '() =&gt; void'.ts(2769)</p>
  <p>index.d.ts(1205, 5): The last overload is declared here.
  Blockquote</p>
  </blockquote>
  <p>I have tried the below code: I still get the same error.</p>
  <pre><code>this.app.listen(port, (err: any, req: express.Request, res: express.Response) 
  </code></pre>
  <p>I could not seem to understand why I am getting this error. Thanks in advance.</p>