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(types): handle Record<string, never> as value for HydratedDocument TOverrides parameter #13123

Merged
merged 2 commits into from Mar 3, 2023

Conversation

vkarpov15
Copy link
Collaborator

Fix #13094

Summary

I applied @hasezoey 's suggested fix for #13094. We can avoid Record<string, never> as a special case, because the only value that matches that is empty object {}. But avoiding Record<string, any> or Record<string, unknown> is hard because it seems like any object extends from Record<string, any>, and there's no good way to check if a type is a record type, or at least if a type is an object with known keys.

I'm open to suggestions for better ways to fix this. But this should be enough to unblock.

Examples

@vkarpov15 vkarpov15 added this to the 7.0.1 milestone Mar 3, 2023
@vkarpov15 vkarpov15 merged commit c4fd23d into master Mar 3, 2023
@hasezoey hasezoey deleted the vkarpov15/gh-13094 branch March 4, 2023 11: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.

[Types] da1aea152ef929bd33a54a462583a79265831d58 broke HydratedDocument with Record inputs
2 participants