Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow null at ne expression second parameter #11996

Merged
merged 3 commits into from Jul 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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