Type Definition of FlattenMap isn't working for non trivial types such as Date and ObjectId #11117
Labels
typescript
Types or Types-test related issue / Pull Request
Milestone
Do you want to request a feature or report a bug?
bug
What is the current behavior?
The type definition of FlattenMaps makes it impossible to be used with ObjectId and Date fields (and maybe other non-trivial types?)
If the current behavior is a bug, please provide the steps to reproduce.
The following TypeScript fails to build:
My
tsconfig.json
What is the expected behavior?
FlattenMaps<T>
needs to be exactlyT
whereT
isDate
orTypes.ObjectId
What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
Note.js: 4.18.2 (although I don't believe it is relevant to this bug)
Mongoose: 6.1.2 (I believe the issue exist since 6.0.12)
MongoDB: 4.4.10 (although I don't believe it is relevant to this bug)
The text was updated successfully, but these errors were encountered: