From 40715fe045815a8104df77169ba7dd12aabbcc20 Mon Sep 17 00:00:00 2001 From: Nick Jiang Date: Thu, 13 Jun 2024 22:02:49 -0700 Subject: [PATCH] Add $documents pipeline stage and fix $unionWith type --- types/pipelinestage.d.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/types/pipelinestage.d.ts b/types/pipelinestage.d.ts index a48d3d12b0a..08a3feb5253 100644 --- a/types/pipelinestage.d.ts +++ b/types/pipelinestage.d.ts @@ -9,6 +9,7 @@ declare module 'mongoose' { | PipelineStage.CollStats | PipelineStage.Count | PipelineStage.Densify + | PipelineStage.Documents | PipelineStage.Facet | PipelineStage.Fill | PipelineStage.GeoNear @@ -93,6 +94,11 @@ declare module 'mongoose' { } } + export interface Documents { + /** [`$documents` reference](https://www.mongodb.com/docs/manual/reference/operator/aggregation/documents/) */ + $documents: Record[] + } + export interface Fill { /** [`$fill` reference](https://www.mongodb.com/docs/manual/reference/operator/aggregation/fill/) */ $fill: { @@ -298,6 +304,7 @@ declare module 'mongoose' { $unionWith: | string | { coll: string; pipeline?: Exclude[] } + | { coll?: string; pipeline: Exclude[] } } export interface Unset {