-
Type: Bug
-
Resolution: Unresolved
-
Priority: Minor - P4
-
None
-
Affects Version/s: 3.6.0, 3.5.2
-
Component/s: None
Using version 3.6.0 of the driver (and 3.5.2) in a typescript project, the result of the .findOneAndDelete() operation is of type FindAndModifyWriteOpResultObject that has a property .value that is typed as possibly undefined.
When executing such function with a filter that does match no documents, what is returned in the .value property is null, not undefined as the typing suggests.
Please change the typing so that it aligns with the runtime type of the .value property.