不要怂,就是干,撸起袖子干!

Commit 149e0c76 by James Dietz Committed by Pedro Augusto de Paula Barbosa

types(query-interface): fix upsert typing (#11674)

1 parent c3dd6a38
...@@ -446,8 +446,9 @@ export class QueryInterface { ...@@ -446,8 +446,9 @@ export class QueryInterface {
*/ */
public upsert( public upsert(
tableName: TableName, tableName: TableName,
values: object, insertValues: object,
updateValues: object, updateValues: object,
where: object,
model: typeof Model, model: typeof Model,
options?: QueryOptions options?: QueryOptions
): Promise<object>; ): Promise<object>;
......
import { DataTypes } from 'sequelize'; import { DataTypes, Model } from 'sequelize';
// tslint:disable-next-line:no-submodule-imports // tslint:disable-next-line:no-submodule-imports
import { QueryInterface } from 'sequelize/lib/query-interface'; import { QueryInterface } from 'sequelize/lib/query-interface';
...@@ -170,3 +170,5 @@ queryInterface.delete(null, 'Person', { ...@@ -170,3 +170,5 @@ queryInterface.delete(null, 'Person', {
a: 1, a: 1,
}, },
}); });
queryInterface.upsert("test", {"a": 1}, {"b": 2}, {"c": 3}, Model, {});
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!