You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched existing issues to ensure the bug has not already been reported
Mongoose version
6.8.3
Node.js version
16.15.0
MongoDB server version
5.0
Typescript version (if applicable)
4.9.4
Description
In a $group step of an aggregation with an inner $mergeObjects, the plain object type is missing in ObjectExpression.
Maybe adding { [key: string]: AccumulatorOperator } is the solution?
Steps to Reproduce
import{Schema,model}from"mongoose"constschema=newSchema({status: String})constdocumentModel=model("Document",schema)documentModel.aggregate([{$group: {_id: "$_id",merged: {$mergeObjects: {status: "$status",// typing error here but valid as query},},},}])
Expected Behavior
No typing error.
The text was updated successfully, but these errors were encountered:
Prerequisites
Mongoose version
6.8.3
Node.js version
16.15.0
MongoDB server version
5.0
Typescript version (if applicable)
4.9.4
Description
In a
$group
step of an aggregation with an inner$mergeObjects
, the plain object type is missing inObjectExpression
.Maybe adding
{ [key: string]: AccumulatorOperator }
is the solution?Steps to Reproduce
Expected Behavior
No typing error.
The text was updated successfully, but these errors were encountered: