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): use MergeTypes for type overrides in HydratedDocument #13066

Merged
merged 4 commits into from Feb 21, 2023

Conversation

vkarpov15
Copy link
Collaborator

Fix #13040

Summary

Use MergeTypes to correctly omit doc paths that conflict with TMethodsAndOverrides. The problem in #13040 is that products has type Product[] | Types.DocumentArray<Product>.

The one test change is due to tsd assertion quirks. I confirmed that Omit<X, never> is equivalent to X, inasmuch as anything is equivalent in TypeScript.

image

Also bumped a couple of dependencies that we already bumped in v7.0 to avoid npm audit warnings.

Examples

@IslandRhythms
Copy link
Collaborator

LGTM

@vkarpov15 vkarpov15 merged commit ce2061e into master Feb 21, 2023
@hasezoey hasezoey deleted the vkarpov15/gh-13040 branch February 22, 2023 11:23
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.

DocumentArrays defined in TMethodsAndOverrides do not correctly override Arrays.
2 participants