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

Add generic for object-merge type #466

Merged
merged 1 commit into from
Jul 18, 2022
Merged

Add generic for object-merge type #466

merged 1 commit into from
Jul 18, 2022

Conversation

alexandredev3
Copy link
Contributor

@alexandredev3 alexandredev3 commented Jun 13, 2022

This improves the flexibility of the merge utility!

Updated tests and test-types passes.

Before, the return and props of the merge utility would always be just an object type.

❌ Not good.
just-merge-before-eg

Now using generics, typescript can figure out the return and props types.

✔️ Good!
just-merge-generic-eg

@angus-c
Copy link
Owner

angus-c commented Jul 18, 2022

Thank you, this is great!

@angus-c angus-c merged commit 80b15e1 into angus-c:master Jul 18, 2022
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.

2 participants