Skip to content

Commit 201071b

Browse files
committed
fix(types): allow any value for AddFields
Fix #12096
1 parent 1306d00 commit 201071b

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

test/types/PipelineStage.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,3 +415,11 @@ const stages4: PipelineStage[] = [
415415
}
416416
}
417417
];
418+
419+
(function gh12096() {
420+
const data: PipelineStage.AddFields = {
421+
$addFields: {
422+
name: { $meta: 'Bill' }
423+
}
424+
};
425+
})();

types/expressions.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2449,7 +2449,7 @@ declare module 'mongoose' {
24492449
FunctionExpression |
24502450
ObjectIdExpression |
24512451
ConditionalExpressionOperator |
2452-
Expression.Let;
2452+
any;
24532453

24542454
export type ObjectIdExpression =
24552455
TypeExpressionOperatorReturningObjectId;

0 commit comments

Comments
 (0)