mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-04-28 08:24:32 +00:00
findOne Optional Fields and Return Single Model
PersistedModel findOne passes single object not array, also filter have optional fields.
This commit is contained in:
2
loopback/index.d.ts
vendored
2
loopback/index.d.ts
vendored
@@ -1262,7 +1262,7 @@ declare namespace l {
|
||||
* @param {Array} model First model instance that matches the filter or null if none found
|
||||
*/
|
||||
|
||||
static findOne(filter?: {fields: string|any|any[]; include: string|any|any[]; order: string; skip: number; where: any; }, callback?: (err: Error, model: any[]) => void): void;
|
||||
static findOne(filter?: {fields?: string|any|any[]; include?: string|any|any[]; order?: string; skip?: number; where?: any; }, callback?: (err: Error, model: any) => void): void;
|
||||
|
||||
/**
|
||||
* Finds one record matching the optional filter object. If not found, creates
|
||||
|
||||
Reference in New Issue
Block a user