Skip to content

Commit

Permalink
Merge pull request #11996 from jyeros/allow-null-ne-expression
Browse files Browse the repository at this point in the history
Allow null at ne expression second parameter
  • Loading branch information
vkarpov15 committed Jul 1, 2022
2 parents 4681d47 + ed90a0a commit aeaaa88
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions test/types/expressions.test.ts
Expand Up @@ -164,3 +164,7 @@ const toLong: Expression = { $toLong: '$qty' };
const nullExpr: Expression = {
$ne: null
};

const nullNETupleExpr: Expression = {
$ne: ['$name', null]
};
2 changes: 1 addition & 1 deletion types/expressions.d.ts
Expand Up @@ -1034,7 +1034,7 @@ declare module 'mongoose' {
*
* @see https://docs.mongodb.com/manual/reference/operator/aggregation/ne/#mongodb-expression-exp.-ne
*/
$ne: Expression | [Expression, Expression] | null;
$ne: Expression | [Expression, Expression | NullExpression] | null;
}

export interface Cond {
Expand Down

0 comments on commit aeaaa88

Please sign in to comment.