Skip to content

Conversation

@vkarpov15
Copy link
Collaborator

Fix #15121

Summary

#15121 points out an unpleasant edge case where our lean type inference breaks completely if @types/node isn't installed, because Buffer === any. Not something we can write tests for unfortunately. But this PR should make Mongoose more resilient to that case, I replaced all extends Buffer checks and we don't have any : Buffer or ?: Buffer params or properties.

Examples

@vkarpov15 vkarpov15 added this to the 8.10.2 milestone Feb 17, 2025
Copy link
Collaborator

@AbdelrahmanHafez AbdelrahmanHafez left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@vkarpov15 vkarpov15 merged commit 987f1ad into master Feb 18, 2025
6 checks passed
@vkarpov15 vkarpov15 deleted the vkarpov15/gh-15121-3 branch February 18, 2025 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How to write a generic function to resolve PopulatedDoc type variables?

4 participants