Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

type(inferrawdoctype): infer Date types as JS dates rather than Mongoose SchemaType Date #14882

Merged
merged 1 commit into from
Sep 11, 2024

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