Skip to content

Commit ec77438

Browse files
committed
Merge branch 'master' of github.com:Automattic/mongoose
2 parents 5687f1a + 3f1d23d commit ec77438

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

test/types/populate.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,4 +227,5 @@ async function _11532() {
227227

228228
if (!leanResult) return;
229229
expectType<string>(leanResult.child.name);
230+
expectError(leanResult?.__v);
230231
}

types/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1776,8 +1776,8 @@ declare module 'mongoose' {
17761776
polygon(path: string, ...coordinatePairs: number[][]): this;
17771777

17781778
/** Specifies paths which should be populated with other documents. */
1779-
populate<Paths = {}, TRawDocType = UnpackedIntersection<ResultType, Paths>>(path: string | string[], select?: string | any, model?: string | Model<any, THelpers>, match?: any): QueryWithHelpers<TRawDocType, DocType, THelpers, TRawDocType>;
1780-
populate<Paths = {}, TRawDocType = UnpackedIntersection<ResultType, Paths>>(options: PopulateOptions | (PopulateOptions | string)[]): QueryWithHelpers<TRawDocType, DocType, THelpers, TRawDocType>;
1779+
populate<Paths = {}>(path: string | string[], select?: string | any, model?: string | Model<any, THelpers>, match?: any): QueryWithHelpers<UnpackedIntersection<ResultType, Paths>, DocType, THelpers, UnpackedIntersection<RawDocType, Paths>>;
1780+
populate<Paths = {}>(options: PopulateOptions | (PopulateOptions | string)[]): QueryWithHelpers<UnpackedIntersection<ResultType, Paths>, DocType, THelpers, UnpackedIntersection<RawDocType, Paths>>;
17811781

17821782
/** Get/set the current projection (AKA fields). Pass `null` to remove the current projection. */
17831783
projection(): ProjectionFields<DocType> | null;

0 commit comments

Comments
 (0)