From 495a0e355ecd1bebd45f562bf7f084222eeb49b7 Mon Sep 17 00:00:00 2001 From: Sindre Moen Date: Fri, 3 Feb 2017 14:01:07 +0100 Subject: [PATCH] =?UTF-8?q?Add=20=E2=80=9Cwhere=E2=80=9D=20selector=20vers?= =?UTF-8?q?ion=20of=20Document#populate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mongoose/index.d.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mongoose/index.d.ts b/mongoose/index.d.ts index 56ad48e617..0ede2141a8 100644 --- a/mongoose/index.d.ts +++ b/mongoose/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for Mongoose 4.7.0 // Project: http://mongoosejs.com/ -// Definitions by: simonxca , horiuchi +// Definitions by: simonxca , horiuchi , sindrenm // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -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. */