title: mongoose.connect(uri, ConnectOptions) does not recognize useNewUrlParser and other options
body: <p>My GitHub repo: <a href="https://github.com/safiullah7/legan" rel="noreferrer">https://github.com/safiullah7/legan</a></p>
  <p>Branch: redux</p>
  <p>I'm following this tutorial: <a href="https://tomanagle.medium.com/build-a-rest-api-with-node-js-typescript-mongodb-b6c898d70d61" rel="noreferrer">https://tomanagle.medium.com/build-a-rest-api-with-node-js-typescript-mongodb-b6c898d70d61</a>
  and I'm unable to connect to my mongodb.
  Here's my code file where I'm trying to connect with the mongodb:</p>
  <pre><code>import config from &quot;config&quot;;
  import log from &quot;../logger&quot;;
  
  function connect() {
    const dbUri = config.get(&quot;dbUri&quot;) as string;
  
    return mongoose
      .connect(dbUri, {
        useNewUrlParser: true,
        useUnifiedTopology: true,
      })
      .then(() =&gt; {
        log.info(&quot;Database connected&quot;);
      })
      .catch((error) =&gt; {
        log.error(&quot;db error&quot;, error);
        process.exit(1);
      });
  }
  
  export default connect;
  </code></pre>
  <p>Compiler gives the following error:</p>
  <pre><code>No overload matches this call.
    Overload 1 of 3, '(uri: string, callback: CallbackWithoutResult): void', gave the following error.
      Argument of type '{ useNewUrlParser: boolean; useUnifiedTopology: boolean; }' is not assignable to parameter of type 'CallbackWithoutResult'.
        Object literal may only specify known properties, and 'useNewUrlParser' does not exist in type 'CallbackWithoutResult'.
    Overload 2 of 3, '(uri: string, options?: ConnectOptions | undefined): Promise&lt;typeof import(&quot;mongoose&quot;)&gt;', gave the following error.
      Argument of type '{ useNewUrlParser: boolean; useUnifiedTopology: boolean; }' is not assignable to parameter of type 'ConnectOptions'.
        Object literal may only specify known properties, and 'useNewUrlParser' does not exist in type 'ConnectOptions'.
  </code></pre>
  <p>I'm new to typescript and node/mongoos. Would appreciate your help.</p>