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

Sum/Subtract: Fix instantiations with unions #1034

Merged
merged 3 commits into from
Jan 13, 2025

Conversation

som-sm
Copy link
Collaborator

@som-sm som-sm commented Jan 12, 2025

Fixes #1033

The issue was that BuildTuple didn’t handle unions properly.

Additionally, noticed that BuildTuple<number, string> currently returns [], fixed it to instead return string[], which makes more sense, in my opinion.

@sindresorhus sindresorhus merged commit 69bfd51 into main Jan 13, 2025
12 checks passed
@sindresorhus sindresorhus changed the title Sum/Subtract/BuildTuple: Fix instantiations with unions Sum/Subtract: Fix instantiations with unions Jan 13, 2025
@sindresorhus sindresorhus deleted the fix/sum-subtract-types-with-unions branch January 13, 2025 03:59
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.

Sum<A, B> and Subtract<A, B> don't work properly for union types
2 participants