title: is there any way to Connect oracledb using typescript ES6 class and module?
body: <p>i'm trying to implement oracle connection using Typescript ES6 Class module. </p>
  
  <p>i have installed @types/oracledb package as well as oracledb package. Jasmin framework is used.</p>
  
  <p>Below are my code which i have implemented.</p>
  
  <pre><code>import * as oracledb from 'oracledb';
  
  export class ConnectionDAO{
  /**
   * Connection Variable Declaration
   */
  conn;
  
  /**
   * Result Variable Declaration
   */
  result;
  
  /**
   *
   * Creates an instance of CommercialDAO.
   * To Initiate Connection and Make the connection utilized by @memberof CommercialDAO
   * @memberof CommercialDAO
   */
  constructor() {
     this.conn = oracledb.getConnection({
          user: "commercial",
          password: "oracle",
          connectString: "localhost/COMMERCIALDB"
        }); 
  }
  
  public getRwCnt() {
      return new Promise(async function(resolve, reject) {
          try {
              let result = this.conn.execute('SELECT TESTCASEID FROM EXECUTE_TESTCASE');
              resolve(this.result.rows.length);
          } catch (err) { // catches errors in getConnection and the query
            reject(err);
          } 
          this.conn.release();
        });
  }
  }
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>TypeError: this.conn.execute is not a function
  </code></pre>
  
  <p>But in this code connection itself not getting stored in 'this.conn' variable.</p>
  
  <p>is there anyway to avoid promises and async function?
  Is there any other solution to achieve this? Please provide you valuable solution and suggestions. Expecting sample snippet.</p>