From 85df9ca5470c3ed5d67650269e75036dcd64b31c Mon Sep 17 00:00:00 2001 From: massimonewsuk <35228622+massimonewsuk@users.noreply.github.com> Date: Mon, 18 Feb 2019 11:41:24 +0000 Subject: [PATCH 1/4] Sequelize - add missing `separate` option on IncludeOptions As per http://docs.sequelizejs.com/class/lib/model.js~Model.html --- types/sequelize/index.d.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/types/sequelize/index.d.ts b/types/sequelize/index.d.ts index 5d1131684c..46da146939 100644 --- a/types/sequelize/index.d.ts +++ b/types/sequelize/index.d.ts @@ -3286,6 +3286,11 @@ declare namespace sequelize { * if true, it will also eager load the relations of the child models, recursively. */ nested?: boolean; + + /** + * If true, runs a separate query to fetch the associated instances, only supported for hasMany associations + */ + separate?: boolean; } /** From 7d1bb67c83f9faf77bf199245307de3777295a76 Mon Sep 17 00:00:00 2001 From: massimonewsuk <35228622+massimonewsuk@users.noreply.github.com> Date: Mon, 18 Feb 2019 12:13:59 +0000 Subject: [PATCH 2/4] Update index.d.ts --- types/sequelize/index.d.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/types/sequelize/index.d.ts b/types/sequelize/index.d.ts index 46da146939..ee9b9ad629 100644 --- a/types/sequelize/index.d.ts +++ b/types/sequelize/index.d.ts @@ -6515,6 +6515,16 @@ declare namespace sequelize { */ logging?: Function; + /** + * Specify the parent transaction so that this transaction is nested or a save point within the parent + */ + transaction?: Transaction; + + /** + * Sets the constraints to be deferred or immediately checked. + */ + deferrable?: Deferrable; + } // From 0e9b6e6a4a4de3b3115d73346b00002d2fba129a Mon Sep 17 00:00:00 2001 From: massimonewsuk <35228622+massimonewsuk@users.noreply.github.com> Date: Mon, 18 Feb 2019 12:16:58 +0000 Subject: [PATCH 3/4] Update index.d.ts --- types/sequelize/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/sequelize/index.d.ts b/types/sequelize/index.d.ts index ee9b9ad629..725eea73e4 100644 --- a/types/sequelize/index.d.ts +++ b/types/sequelize/index.d.ts @@ -5774,7 +5774,7 @@ declare namespace sequelize { /** * A reference to the deferrable collection. Use this to access the different deferrable options. */ - Deferrable: Deferrable; + deferrable?: Deferrable[keyof Deferrable]; /** * A reference to the sequelize instance class. From 261231ba7b5725b4513619987f146eec32f1cff7 Mon Sep 17 00:00:00 2001 From: massimonewsuk <35228622+massimonewsuk@users.noreply.github.com> Date: Mon, 18 Feb 2019 12:18:01 +0000 Subject: [PATCH 4/4] Update index.d.ts --- types/sequelize/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/sequelize/index.d.ts b/types/sequelize/index.d.ts index 725eea73e4..d89dac0d4a 100644 --- a/types/sequelize/index.d.ts +++ b/types/sequelize/index.d.ts @@ -5774,7 +5774,7 @@ declare namespace sequelize { /** * A reference to the deferrable collection. Use this to access the different deferrable options. */ - deferrable?: Deferrable[keyof Deferrable]; + Deferrable: Deferrable; /** * A reference to the sequelize instance class. @@ -6523,7 +6523,7 @@ declare namespace sequelize { /** * Sets the constraints to be deferred or immediately checked. */ - deferrable?: Deferrable; + deferrable?: Deferrable[keyof Deferrable]; }