0

so basically i cannot add await before pool.getConnection(). It sais 'await' has no effect on the type of this expression.

        const conn = await pool.getConnection();

pool is of type

mysql.createPool({
    host: process.env.DB_HOST,
    user: process.env.DB_USER,
    database: process.env.DB_NAME,
    password: process.env.DB_PASSWORD,
    waitForConnections: true,
    connectionLimit: 10,
    queueLimit: 0
}).promise()

what should be the problem?

FLTY
  • 35
  • 6
  • This is not a type. The documentation doesn't say anything about using `await` with `getConnection` – Konrad Jan 17 '23 at 14:23

0 Answers0