title: Typescript nested arrow function callback is not working as expeceted
body: <p>this.Pool</p>
  <pre><code>import mysql2 from 'mysql2/promise';
  
  this.Pool = mysql2.createPool({   
              host : &quot;1&quot;,
              user : &quot;2&quot;,
              password : &quot;3&quot;,
              database : &quot;4&quot;
             })
  </code></pre>
  <pre><code>    async createTable(table: string): Promise&lt;void&gt; {
          await this.Pool.getConnection(async (connection) =&gt; {
              await connection.query(`CREATE TABLE IF NOT EXISTS \`${table}\`(
                  a INT,
                  b INT
  
              );`);
              console.log(&quot;TABLE CREATED&quot;);
          });
      }
  </code></pre>
  <p>in this case, the code just waits to get promise</p>
  <pre><code>    async createTable(table: string): Promise&lt;void&gt; {
          await this.Pool.getConnection(async (connection) =&gt; {
              return await connection.query(`CREATE TABLE IF NOT EXISTS \`${table}\`(
                  a INT,
                  b INT
  
              );`);
              console.log(&quot;TABLE CREATED&quot;);
          });
      }
  </code></pre>
  <p>but it just works..</p>
  <p>this seems a bit different what I know. I know that Javascript automatically returns a Promise even if an asynchronous function does not return anything. is there something wrong in code or my knowledge?</p>