diff --git a/types/sequelize/index.d.ts b/types/sequelize/index.d.ts index b6871ca3c4..f80d5acc40 100644 --- a/types/sequelize/index.d.ts +++ b/types/sequelize/index.d.ts @@ -139,7 +139,7 @@ declare namespace sequelize { * @see http://docs.sequelizejs.com/en/latest/api/associations/belongs-to/ * @see Instance */ - interface BelongsToCreateAssociationMixin { + interface BelongsToCreateAssociationMixin { /** * Create a new instance of the associated model and associate it with this. * @param values The values used to create the association. @@ -148,7 +148,7 @@ declare namespace sequelize { ( values?: TAttributes, options?: BelongsToCreateAssociationMixinOptions | CreateOptions | BelongsToSetAssociationMixinOptions - ): Promise; + ): Promise; } /** diff --git a/types/sequelize/sequelize-tests.ts b/types/sequelize/sequelize-tests.ts index 0592a36df4..4e0aa9a73d 100644 --- a/types/sequelize/sequelize-tests.ts +++ b/types/sequelize/sequelize-tests.ts @@ -220,7 +220,7 @@ barcode.setProduct(product, { save: true }).then(() => { }); barcode.createProduct(); barcode.createProduct({ id: 1, name: 'Crowbar' }); -barcode.createProduct({ id: 1 }, { save: true, silent: true }).then((product) => { }); +barcode.createProduct({ id: 1 }, { save: true, silent: true }).then((product: ProductInstance) => { }); product.getWarehouse(); product.getWarehouse({ scope: null }).then(w => w.capacity); @@ -365,7 +365,7 @@ interface ProductInstance extends Sequelize.Instance, Product // belongsTo association mixins: getWarehouse: Sequelize.BelongsToGetAssociationMixin; setWarehouse: Sequelize.BelongsToSetAssociationMixin; - createWarehouse: Sequelize.BelongsToCreateAssociationMixin; + createWarehouse: Sequelize.BelongsToCreateAssociationMixin; }; interface BarcodeAttributes { @@ -378,7 +378,7 @@ interface BarcodeInstance extends Sequelize.Instance, Barcode // belongsTo association mixins: getProduct: Sequelize.BelongsToGetAssociationMixin; setProduct: Sequelize.BelongsToSetAssociationMixin; - createProduct: Sequelize.BelongsToCreateAssociationMixin; + createProduct: Sequelize.BelongsToCreateAssociationMixin; }; interface WarehouseAttributes {