mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 06:47:03 +00:00
Merge pull request #14350 from tdreyno/patch-1
Sequelize: Fix findOr prefixed method types
This commit is contained in:
Vendored
+4
-4
@@ -3819,8 +3819,8 @@ declare namespace sequelize {
|
||||
* Find a row that matches the query, or build (but don't save) the row if none is found.
|
||||
* The successfull result of the promise will be (instance, initialized) - Make sure to use .spread()
|
||||
*/
|
||||
findOrInitialize(options: FindOrInitializeOptions<TAttributes>): Promise<TInstance>;
|
||||
findOrBuild(options: FindOrInitializeOptions<TAttributes>): Promise<TInstance>;
|
||||
findOrInitialize(options: FindOrInitializeOptions<TAttributes>): Promise<[TInstance, boolean]>;
|
||||
findOrBuild(options: FindOrInitializeOptions<TAttributes>): Promise<[TInstance, boolean]>;
|
||||
|
||||
/**
|
||||
* Find a row that matches the query, or build and save the row if none is found
|
||||
@@ -3833,13 +3833,13 @@ declare namespace sequelize {
|
||||
* an instance of sequelize.TimeoutError will be thrown instead. If a transaction is created, a savepoint
|
||||
* will be created instead, and any unique constraint violation will be handled internally.
|
||||
*/
|
||||
findOrCreate(options: FindOrInitializeOptions<TAttributes>): Promise<TInstance>;
|
||||
findOrCreate(options: FindOrInitializeOptions<TAttributes>): Promise<[TInstance, boolean]>;
|
||||
|
||||
/**
|
||||
* A more performant findOrCreate that will not work under a transaction (at least not in postgres)
|
||||
* Will execute a find call, if empty then attempt to create, if unique constraint then attempt to find again
|
||||
*/
|
||||
findCreateFind(options: FindCreateFindOptions<TAttributes>): Promise<TInstance>;
|
||||
findCreateFind(options: FindCreateFindOptions<TAttributes>): Promise<[TInstance, boolean]>;
|
||||
|
||||
/**
|
||||
* Insert or update a single row. An update will be executed if a row which matches the supplied values on
|
||||
|
||||
Reference in New Issue
Block a user