From 8a646997b0baf0a1d4f6ae7cc436c3a75105b022 Mon Sep 17 00:00:00 2001 From: Davide Violante Date: Mon, 20 Dec 2021 10:37:14 +0100 Subject: [PATCH] Fix TS typings in Group stage --- index.d.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/index.d.ts b/index.d.ts index 2627cc7514d..b35298e2bf6 100644 --- a/index.d.ts +++ b/index.d.ts @@ -3058,10 +3058,7 @@ declare module 'mongoose' { export interface Group { /** [`$group` reference](https://docs.mongodb.com/manual/reference/operator/aggregation/group) */ - $group: { - _id: any - [key: string]: { [op in AccumulatorOperator]?: any } - } + $group: { _id: any } | { _id: any; [key: string]: { [op in AccumulatorOperator]?: any } } } export interface IndexStats {