Skip to content

Commit

Permalink
fix(types): allow any value for AddFields
Browse files Browse the repository at this point in the history
Fix #12096
  • Loading branch information
vkarpov15 committed Jul 17, 2022
1 parent 1306d00 commit 201071b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions test/types/PipelineStage.test.ts
Expand Up @@ -415,3 +415,11 @@ const stages4: PipelineStage[] = [
}
}
];

(function gh12096() {
const data: PipelineStage.AddFields = {
$addFields: {
name: { $meta: 'Bill' }
}
};
})();
2 changes: 1 addition & 1 deletion types/expressions.d.ts
Expand Up @@ -2449,7 +2449,7 @@ declare module 'mongoose' {
FunctionExpression |
ObjectIdExpression |
ConditionalExpressionOperator |
Expression.Let;
any;

export type ObjectIdExpression =
TypeExpressionOperatorReturningObjectId;
Expand Down

0 comments on commit 201071b

Please sign in to comment.