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

Fix return types for findByIdAndDelete overrides #14196

Merged
merged 3 commits into from Dec 27, 2023
Merged

Conversation

vkarpov15
Copy link
Collaborator

Summary

Fix #14190; findByIdAndDelete() is currently returning ModifyResult even if options isn't set

Examples

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, aside from the TS-Lint issues and a question

Comment on lines 535 to 537
expectAssignable<
ModifyResult<ReturnType<(typeof UserModel)['hydrate']>>
>(res);
Copy link
Collaborator

Choose a reason for hiding this comment

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

is expectType not working here?

@hasezoey hasezoey added the typescript Types or Types-test related issue / Pull Request label Dec 27, 2023
@vkarpov15 vkarpov15 merged commit 4b069e8 into master Dec 27, 2023
3 checks passed
@vkarpov15 vkarpov15 added this to the 8.0.4 milestone Dec 27, 2023
@hasezoey hasezoey deleted the vkarpov15/gh-14190 branch December 27, 2023 19:34
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.

Incorrect return type of findByIdAndDelete()
2 participants