diff --git a/promise.d.ts b/promise.d.ts index f0c56b7e27..efe50005a6 100644 --- a/promise.d.ts +++ b/promise.d.ts @@ -117,7 +117,7 @@ export interface PoolCluster extends EventEmitter { on(event: string, listener: (args: any[]) => void): this; on(event: 'remove', listener: (nodeId: number) => void): this; - on(event: 'connection', listener: (connection: PoolConnection) => void): this; + on(event: 'warn', listener: (err: Error) => void): this; } export function createConnection(connectionUri: string): Promise; diff --git a/promise.js b/promise.js index c4bb609038..95c5808b45 100644 --- a/promise.js +++ b/promise.js @@ -448,7 +448,7 @@ class PromisePoolCluster extends EventEmitter { super(); this.poolCluster = poolCluster; this.Promise = thePromise || Promise; - inheritEvents(poolCluster, this, ['acquire', 'connection', 'enqueue', 'release']); + inheritEvents(poolCluster, this, ['warn', 'remove']); } getConnection() {