Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

444
Views
How can I connect oracledb (v 5.2.1) with typescript(ES6)?

I have a problem migrating my connection built with JavaScript to Typescript(I have "@types / oracledb": "^5.2.1")

My db.js

const oracledb = require('oracledb');
let dbConfig = require('./dbconfig');

oracledb.initOracleClient({ libDir: 'D:\\MaterialSkywork\\Oracle\\instantclient_21_3' });


console.log(dbConfig)

async function Open(sql, binds, autoCommit) {
    let cnn = await oracledb.getConnection(dbConfig);
    let result = await cnn.execute(sql, binds, { autoCommit });
    cnn.release();
    return result;
}

exports.Open = Open;

My connection.ts

const oracledb = require('oracledb');
let dbConfig = require('./dbconfig');

oracledb.initOracleClient({ libDir: 'D:\\MaterialSkywork\\Oracle\\instantclient_21_3' });


console.log(dbConfig)

async function Open(sql, binds, autoCommit) {
    let cnn = await oracledb.getConnection(dbConfig);
    let result = await cnn.execute(sql, binds, { autoCommit });
    cnn.release();
    return result;
}

exports.Open = Open;

enter image description here


I have the following errors:

No overload matches this call - let cnn = await OracleDB.getConnection(dbConnection);

TypeError: this.conn.execute is not a function

TypeError: this.conn.release is not a function

I do not understand why my connection in typescript skips several errors.

I tried to follow the steps in this forum on stackoverflow, but there are no properties in @ node / oracledb as they are (IConnection and IPromise)

is there any way to Connect oracledb using typescript ES6 class and module?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!