Skip to content

Commit ec0fde9

Browse files
committed
fix: added typings for acquireTimeout option
1 parent 1e3cf9b commit ec0fde9

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

test/tsc-build/mysql/createPool/callbacks/createPool.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,8 @@ import { uriAccess, access } from '../../baseConnection.test.js';
99

1010
uriPool = mysql.createPool(uriAccess);
1111
pool = mysql.createPool(access);
12+
pool = mysql.createPool({
13+
...access,
14+
acquireTimeout: 1000,
15+
});
1216
})();

typings/mysql/lib/Pool.d.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ export interface PoolOptions extends ConnectionOptions {
2222
*/
2323
connectionLimit?: number;
2424

25+
/**
26+
* The maximum time (in milliseconds) to wait for getting a connection from the pool. (Default: 10 seconds)
27+
*
28+
* @default 10000
29+
*/
30+
acquireTimeout?: number;
31+
2532
/**
2633
* The maximum number of idle connections. (Default: same as `connectionLimit`)
2734
*/

0 commit comments

Comments
 (0)