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(model+query): unpack arrays in distinct return type #14047

Merged
merged 2 commits into from Nov 6, 2023

Conversation

vkarpov15
Copy link
Collaborator

Fix #14026

Summary

Unpack<T> returns the array element type if T is an array, or T otherwise. We already use Unpacked<> in some similar cases, like async iterators for aggregate().

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 my understanding this should also change if the inferred type is used, maybe add a test for that too? (no explicit interface)

@vkarpov15 vkarpov15 added this to the 8.0.1 milestone Nov 6, 2023
@vkarpov15 vkarpov15 merged commit 1bfcdf6 into master Nov 6, 2023
3 checks passed
@vkarpov15 vkarpov15 deleted the vkarpov15/gh-14026 branch November 6, 2023 17:40
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.

Incorrect inferred return type for distinct() on array fields
2 participants