diff --git a/types/pipelinestage.d.ts b/types/pipelinestage.d.ts index 5d3c4023f0d..bbc98324a75 100644 --- a/types/pipelinestage.d.ts +++ b/types/pipelinestage.d.ts @@ -202,7 +202,7 @@ declare module 'mongoose' { export interface ReplaceWith { /** [`$replaceWith` reference](https://docs.mongodb.com/manual/reference/operator/aggregation/replaceWith/) */ - $replaceWith: ObjectExpressionOperator; + $replaceWith: ObjectExpressionOperator | { [field: string]: Expression }; } export interface Sample {