-
Type: Improvement
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: TypeScript
How are you using Mongo? What version of the server and driver are you using?
4.2
What is the feauture/improvement you would like?
Right now, Filter<TSchema> (used for things like type hinting in find operation options) does not provide type hinting support for _id, which is an allowed property regardless of whether it's explicitly defined by the user.
A previous feature added `Filter<WithId<TSchema>>` as the expected input for the find operation explicitly, but we should make this functionality part of the Filter type definition itself (i.e., `Filter<TSchema>` should internally operate on `WithId<TSchema>`), so that every place where `Filter<TSchema>` is used has type support for _id.
What use case would this feature/improvement enable?
Better type hinting for _id when used in operation filters.