diff --git a/types/lib/query-interface.d.ts b/types/lib/query-interface.d.ts index 0f230c5df138..7dd81b4d1e6d 100644 --- a/types/lib/query-interface.d.ts +++ b/types/lib/query-interface.d.ts @@ -498,7 +498,7 @@ export class QueryInterface { tableName: TableName, records: object[], options?: QueryOptions, - attributes?: string[] | string + attributes?: ModelAttributes ): Promise; /** @@ -520,7 +520,7 @@ export class QueryInterface { values: object, identifier: WhereOptions, options?: QueryOptions, - attributes?: string[] | string + attributes?: ModelAttributes ): Promise; /** diff --git a/types/test/query-interface.ts b/types/test/query-interface.ts index 25454db082ff..3e5927f38a31 100644 --- a/types/test/query-interface.ts +++ b/types/test/query-interface.ts @@ -65,9 +65,9 @@ async function test() { await queryInterface.bulkDelete({ tableName: 'foo', schema: 'bar' }, {}, {}); - const bulkInsertRes: Promise = queryInterface.bulkInsert({ tableName: 'foo', as: 'bar', name: 'as' }, [{}], {}); + const bulkInsertRes: Promise = queryInterface.bulkInsert({ tableName: 'foo', as: 'bar', name: 'as' }, [{}], {}, { attr1: { type: DataTypes.STRING }, attr2: { type: DataTypes.JSON, } }); - await queryInterface.bulkUpdate({ tableName: 'foo', delimiter: 'bar', as: 'baz', name: 'quz' }, {}, {}); + await queryInterface.bulkUpdate({ tableName: 'foo', delimiter: 'bar', as: 'baz', name: 'quz' }, {}, {}, {}, { attr1: { type: DataTypes.STRING }, attr2: { type: DataTypes.JSON } }); await queryInterface.dropTrigger({ tableName: 'foo', as: 'bar', name: 'baz' }, 'foo', {});