From a455e18ebf2069b6b6c26c1452262e394d416c21 Mon Sep 17 00:00:00 2001 From: Eugene Korshenko Date: Tue, 4 Jan 2022 18:18:45 +0200 Subject: [PATCH] types: Fix return type of `projection` method --- index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index eca337fc7a2..1e7cafc434d 100644 --- a/index.d.ts +++ b/index.d.ts @@ -2403,7 +2403,7 @@ declare module 'mongoose' { populate(options: PopulateOptions | Array): QueryWithHelpers, DocType, THelpers, RawDocType>; /** Get/set the current projection (AKA fields). Pass `null` to remove the current projection. */ - projection(fields?: any | null): any; + projection(fields?: any | null): this; /** Determines the MongoDB nodes from which to read. */ read(pref: string | mongodb.ReadPreferenceMode, tags?: any[]): this;