-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Let XOR
take multiple arguments?
#22
Comments
Hey Christian, thanks for coming over and sharing your thoughts! I've looked into this in the past and even though I'd get the syntax to work in some cases, there would be regressions in others. I'm a bit tight on time, but I'll look into it when possible. I'll leave the issue open regardless, in case someone can solve this puzzle and PR it in the meantime :)) |
As workaround I can propose to you these solution microsoft/TypeScript#14094 (comment) |
That's interesting (I haven't actually tested that it works as expected without regressions). Preferably, though, the feature would not be a breaking change (nor a new type would be added). Something like this would expand the current |
Just to clarify: under the word "you" I meant @christianalares About AllXOR. I used it in a few projects since 2020 and it works as expected but VSCode tooltips look ugly as F. |
There is a nice example of how to use this with more than two types:
Is there a possibility to make the helper more dynamic so you can pass more than two arguments to this helper such as:
I'm not a TS expert but isn't there away to spread types using the spread syntax? (
...
)The text was updated successfully, but these errors were encountered: