Adds types for start method on generic-pool (#27801)

This commit is contained in:
Joe Ruello
2018-08-03 02:59:50 +10:00
committed by Sheetal Nandi
parent e8982eabf4
commit a8f8fdcd1e
2 changed files with 3 additions and 0 deletions

View File

@@ -41,6 +41,8 @@ const opts = {
const pool = genericPool.createPool<Connection>(factory, opts);
pool.start();
pool.use((conn: Connection) => 'test')
.then((result: string) => { });

View File

@@ -17,6 +17,7 @@ export class Pool<T> extends EventEmitter {
max: number;
min: number;
start(): void;
acquire(priority?: number): PromiseLike<T>;
release(resource: T): void;
destroy(resource: T): void;