Skip to content

Commit 551a1f3

Browse files
Update $ne operator to include null type
Allow $ne operator to accept null values. null value is useful when we want to have a similar behavior as exists, but including `null` values even if the Value is not declared as nullable.
1 parent 49c5b6f commit 551a1f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mongo_types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ export interface FilterOperators<TValue> extends NonObjectIdLikeDocument {
128128
$in?: ReadonlyArray<TValue>;
129129
$lt?: TValue;
130130
$lte?: TValue;
131-
$ne?: TValue;
131+
$ne?: TValue | null;
132132
$nin?: ReadonlyArray<TValue>;
133133
// Logical
134134
$not?: TValue extends string ? FilterOperators<TValue> | RegExp : FilterOperators<TValue>;

0 commit comments

Comments
 (0)