title: MYSql connection in TypeScript Error: No overload matches this call?
body: <p>I have MySql2 DB config function</p>
  <pre><code>const db = mysql.createConnection({
   host: process.env['SQL_HOST'],
    user: process.env['SQL_USER'],
    password: process.env['SQL_PASSWORD'],
  });
  </code></pre>
  <p>I get this error:</p>
  <pre><code>No overload matches this call.
    Overload 1 of 2, '(connectionUri: string): Connection', gave the following error.
      Argument of type '{ host: string | undefined; user: string | undefined; password: string | undefined; }' is not assignable to parameter of type 'string'.
    Overload 2 of 2, '(config: ConnectionOptions): Connection', gave the following error.
      Argument of type '{ host: string | undefined; user: string | undefined; password: string | undefined; }' is not assignable to parameter of type 'ConnectionOptions' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties.
        Types of property 'user' are incompatible.
          Type 'string | undefined' is not assignable to type 'string'.
            Type 'undefined' is not assignable to type 'string'.
  </code></pre>
  <p>Has anyone got this error?</p>