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

IfType type guards #788

Open
ZachHaber opened this issue Jan 2, 2024 · 1 comment
Open

IfType type guards #788

ZachHaber opened this issue Jan 2, 2024 · 1 comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed type addition

Comments

@ZachHaber
Copy link

ZachHaber commented Jan 2, 2024

The readme mentions that there should be a corresponding IfType guard for every IsType check.

For every IsT type (e.g. IsAny), there is an associated IfT type that can help simplify conditional types.

I'm only seeing a few IfType guards in the package (IfNever, IfAny, and IfUnknown).

Potential fixes (that I can think of at the moment):

  1. Add the missing IfType guards
  2. Update the readme to specifically call out those three guards

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
@sindresorhus
Copy link
Owner

PR welcome for types starting with Is that are missing an If type.

@sindresorhus sindresorhus added help wanted Extra attention is needed good first issue Good for newcomers type addition labels Jan 2, 2024
harsh-srivastava44 pushed a commit to harsh-srivastava44/type-fest that referenced this issue Jan 7, 2024
harsh-srivastava44 pushed a commit to harsh-srivastava44/type-fest that referenced this issue Jan 7, 2024
@sindresorhus sindresorhus pinned this issue Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed type addition
Projects
None yet
Development

No branches or pull requests

2 participants