mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-30 23:30:06 +00:00
Add “where” selector version of Document#populate
This commit is contained in:
4
mongoose/index.d.ts
vendored
4
mongoose/index.d.ts
vendored
@@ -1,6 +1,6 @@
|
||||
// Type definitions for Mongoose 4.7.0
|
||||
// Project: http://mongoosejs.com/
|
||||
// Definitions by: simonxca <https://github.com/simonxca/>, horiuchi <https://github.com/horiuchi/>
|
||||
// Definitions by: simonxca <https://github.com/simonxca/>, horiuchi <https://github.com/horiuchi/>, sindrenm <https://github.com/sindrenm>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="mongodb" />
|
||||
@@ -994,10 +994,12 @@ declare module "mongoose" {
|
||||
* call execPopulate(). Passing the same path a second time will overwrite
|
||||
* the previous path options. See Model.populate() for explaination of options.
|
||||
* @param path The path to populate or an options object
|
||||
* @param names The properties to fetch from the populated document
|
||||
* @param callback When passed, population is invoked
|
||||
*/
|
||||
populate(callback: (err: any, res: this) => void): this;
|
||||
populate(path: string, callback?: (err: any, res: this) => void): this;
|
||||
populate(path: string, names: string, callback?: (err: any, res: this) => void): this;
|
||||
populate(options: ModelPopulateOptions | ModelPopulateOptions[], callback?: (err: any, res: this) => void): this;
|
||||
|
||||
/** Gets _id(s) used during population of the given path. If the path was not populated, undefined is returned. */
|
||||
|
||||
Reference in New Issue
Block a user