How to type QueryWithHelpers
so that it returns both HydratedDocument
and FlattenMaps
?
#15311
Open
1 task done
Labels
help wanted
help
This issue can likely be resolved in GitHub issues. No bug fixes, features, or docs necessary
Prerequisites
Mongoose version
8.12.1
Node.js version
20.10.0
MongoDB version
6.0.2
Operating system
macOS
Operating system version (i.e. 20.04, 11.3, 10)
No response
Issue
In the example provided in the documentation, the query helper
byName
returns aHydratedDocument
ofProject
. However, if the query islean
, it should consequently return theFlattenMaps
type. How can the typing be corrected?"Reproduction link here.
The text was updated successfully, but these errors were encountered: