Skip to content

Conversation

vkarpov15
Copy link
Collaborator

Fix #14839

Summary

For some reason, it looks like inferRawDocType<> is inferring dates as Mongoose Date SchemaType rather than JavaScript dates. If I change to NativeDate, that works as expected. I made the same change in InferRawDocType, which doesn't look to be affected by this issue, but should fix that just in case TypeScript decides to change its mind.

Examples

@vkarpov15 vkarpov15 added this to the 8.6.2 milestone Sep 10, 2024
@hasezoey hasezoey added the typescript Types or Types-test related issue / Pull Request label Sep 11, 2024
@vkarpov15 vkarpov15 merged commit 36fa0c0 into master Sep 11, 2024
5 checks passed
@hasezoey hasezoey deleted the vkarpov15/gh-14839 branch September 12, 2024 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
typescript Types or Types-test related issue / Pull Request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

InferRawDocType not same type return from .lean()
2 participants