diff --git a/types/query.d.ts b/types/query.d.ts index 71e3a03ec24..3145dfef477 100644 --- a/types/query.d.ts +++ b/types/query.d.ts @@ -614,7 +614,28 @@ declare module 'mongoose' { polygon(...coordinatePairs: number[][]): this; /** Specifies paths which should be populated with other documents. */ - populate( + populate( + path: string | string[], + select?: string | any, + model?: string | Model, + match?: any + ): QueryWithHelpers< + ResultType, + DocType, + THelpers, + RawDocType, + QueryOp + >; + populate( + options: PopulateOptions | (PopulateOptions | string)[] + ): QueryWithHelpers< + ResultType, + DocType, + THelpers, + RawDocType, + QueryOp + >; + populate( path: string | string[], select?: string | any, model?: string | Model, @@ -626,7 +647,7 @@ declare module 'mongoose' { UnpackedIntersection, QueryOp >; - populate( + populate( options: PopulateOptions | (PopulateOptions | string)[] ): QueryWithHelpers< MergePopulatePaths,