From 9d793b349cc44a1cb6f4203ed2c8766b56c0ba96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B8=A1=E8=B0=B7?= Date: Tue, 3 Sep 2019 16:58:27 +0900 Subject: [PATCH] fix(types): add PoolOptions.evict (#11378) --- types/lib/sequelize.d.ts | 5 +++++ types/test/sequelize.ts | 3 +++ 2 files changed, 8 insertions(+) diff --git a/types/lib/sequelize.d.ts b/types/lib/sequelize.d.ts index 939a66465d4a..365af03b247a 100644 --- a/types/lib/sequelize.d.ts +++ b/types/lib/sequelize.d.ts @@ -96,6 +96,11 @@ export interface PoolOptions { */ acquire?: number; + /** + * The time interval, in milliseconds, after which sequelize-pool will remove idle connections. + */ + evict?: number; + /** * A function that validates a connection. Called with client. The default function checks that client is an * object, and that its state is not disconnected diff --git a/types/test/sequelize.ts b/types/test/sequelize.ts index 4d7a4bfd5a3d..09a2e61066f7 100644 --- a/types/test/sequelize.ts +++ b/types/test/sequelize.ts @@ -15,6 +15,9 @@ export const sequelize = new Sequelize({ match: ['hurr'], }, dialectModule: {}, + pool: { + evict: 1000, + } }); const conn = sequelize.connectionManager;