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

Use XOR for TooltipProps #248

Merged
merged 1 commit into from
Sep 23, 2024
Merged

Use XOR for TooltipProps #248

merged 1 commit into from
Sep 23, 2024

Conversation

MidhunSureshR
Copy link
Member

Two problems when using union:

  1. You can provide both a label and a description without typescript complaining.
  2. You can't do const foo:TooltipProps["label"] or TooltipProps["description"].

Two problems when using union:
1. You can provided both a label and description and typescript
   won't complain about it.
2. You cant do TooltipProps["label"] or TooltipProps["description"].
@MidhunSureshR MidhunSureshR requested a review from a team as a code owner September 22, 2024 16:53
@MidhunSureshR MidhunSureshR requested review from dbkr and removed request for a team September 22, 2024 16:53
@MidhunSureshR MidhunSureshR merged commit 7662d57 into main Sep 23, 2024
6 checks passed
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