update mongoose deep populate options fixes #11571

This commit is contained in:
Simon
2016-11-21 21:07:49 -05:00
parent ac7eff8705
commit 5fc9a83c88

View File

@@ -813,7 +813,8 @@ declare module "mongoose" {
*/
populate(callback: (err: any, res: this) => void): this;
populate(path: string, callback?: (err: any, res: this) => void): this;
populate(options: ModelPopulateOptions, 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. */
populated(path: string): any;
@@ -1454,7 +1455,7 @@ declare module "mongoose" {
*/
populate(path: string | Object, select?: string | Object, model?: any,
match?: Object, options?: Object): this;
populate(options: ModelPopulateOptions): this;
populate(options: ModelPopulateOptions | ModelPopulateOptions[]): this;
/**
* Determines the MongoDB nodes from which to read.
@@ -2428,6 +2429,8 @@ declare module "mongoose" {
model?: string;
/** optional query options like sort, limit, etc */
options?: Object;
/** deep populate */
populate?: ModelPopulateOptions | ModelPopulateOptions[]
}
interface ModelUpdateOptions {