From 551a1f3e3a8ab991bbdd9972dbaa2bea1448fe16 Mon Sep 17 00:00:00 2001 From: Christophe Hurpeau <302891+christophehurpeau@users.noreply.github.com> Date: Thu, 20 Nov 2025 16:19:05 +0100 Subject: [PATCH] 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. --- src/mongo_types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mongo_types.ts b/src/mongo_types.ts index 3c56585a73..8029969e2b 100644 --- a/src/mongo_types.ts +++ b/src/mongo_types.ts @@ -128,7 +128,7 @@ export interface FilterOperators extends NonObjectIdLikeDocument { $in?: ReadonlyArray; $lt?: TValue; $lte?: TValue; - $ne?: TValue; + $ne?: TValue | null; $nin?: ReadonlyArray; // Logical $not?: TValue extends string ? FilterOperators | RegExp : FilterOperators;