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

Update Merge type to accept N type arguments #808

Open
roryabraham opened this issue Jan 30, 2024 · 1 comment
Open

Update Merge type to accept N type arguments #808

roryabraham opened this issue Jan 30, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@roryabraham
Copy link

roryabraham commented Jan 30, 2024

Currently Merge is limited to only 2 arguments Merge<Destination, Source>. In cases where you want to merge more things, you have to nest it, like so:

type MyComplexType = Merge<
    FinalDestination,
    Merge<
        IntermediateDestination,
        Source,
    >,
>;

This request is just to give some syntactic sugar for that case, like so:

type MyComplexType = Merge<FinalDestination, IntermediateDestination, Source>;

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • The funding will be given to active contributors.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
@roryabraham roryabraham changed the title Feature request: Update Merge type to accept N type arguments Update Merge type to accept N type arguments Jan 30, 2024
@roryabraham
Copy link
Author

Seems like this isn't really possible, needs a feature like this to allow spread in generics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants