-
Type: Task
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Empty show more show less
-
Not Needed
NODE-4007 Description
How are you using Mongo? What version of the server and driver are you using?
I'm using the npm mongodb version 4.2.2.
What is the feauture/improvement you would like?
The typing declares `interface FilterOperators<TValue> extends Document { ... }`
I think you mean `interface FilterOperators<TValue extends Document > { ... }`
What use case would this feature/improvement enable?
Currently, `findOne<TSchema> (filter: Filter)` can accept anything as it's arguement (not much type safety). This is because `Filter` extends `RootFilterOperators` which extends `Document`:
```
Filter<TSchema> =
& RootFilterOperators<WithId<TSchema>>;
```
I think you mean for `RootFilterOperators` to only be a bunch of keys that start with "$" (e.g. `$eq`, `$gt`, etc ...).
- is depended on by
-
NODE-4007 Apparent bug in typing
- Closed