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

types(document): make document _id type default to unknown instead of any #14541

Merged
merged 2 commits into from
Apr 27, 2024

Conversation

vkarpov15
Copy link
Collaborator

Fix #14520

Summary

I don't see any reason why IdType can't default to unknown, tests pass and unknown seems more correct. @hasezoey can you please check if this causes any problems for typegoose?

Examples

@vkarpov15 vkarpov15 added this to the 8.4 milestone Apr 26, 2024
Copy link
Collaborator

@hasezoey hasezoey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, also no problems with typegoose.
typegoose already had (more or less always) typed the first parameter of Document to unknown: DocumentType

@hasezoey hasezoey added the typescript Types or Types-test related issue / Pull Request label Apr 27, 2024
@vkarpov15
Copy link
Collaborator Author

I accidentally pushed fix for #14520 into this branch, so I will merge into 8.4 and then cherry pick 23869fb

@vkarpov15 vkarpov15 changed the base branch from master to 8.4 April 27, 2024 15:23
@vkarpov15 vkarpov15 merged commit cb2e7c1 into 8.4 Apr 27, 2024
37 checks passed
@vkarpov15 vkarpov15 deleted the vkarpov15/gh-14520 branch April 27, 2024 15:24
@hasezoey
Copy link
Collaborator

I accidentally pushed fix for #14520 into this branch

i was slightly confused, do you mean #14527 and #14444 instead? as #14520 is the issue this PR was made for

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.

Why is the default type of the generic field _id in the class Document of type "any"?
2 participants