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

Make the second argument to RequireAllOrNone optional #847

Closed
roryabraham opened this issue Mar 27, 2024 · 4 comments · Fixed by #907
Closed

Make the second argument to RequireAllOrNone optional #847

roryabraham opened this issue Mar 27, 2024 · 4 comments · Fixed by #907
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@roryabraham
Copy link
Contributor

roryabraham commented Mar 27, 2024

Minor suggestion for an enhancement - make the second argument to RequireAllOrNone optional:

i.e: RequireAllOrNone<MyType> would be functionally equivalent to RequireAllOrNone<MyType, keyof MyType>

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

Makes sense to me.

@tommy-mitchell Any reason you went with never? I noticed you used key T in your issue: #652 (comment)

@tommy-mitchell
Copy link
Contributor

I didn't add the never constraint, that was introduced when RequireAllOrNone was created in #254.

We're just inconsistent in general with our RequireX types - some have an optional second parameter, others don't. I think all of them should, personally.

@sindresorhus
Copy link
Owner

Alright. Let's do it.

@roryabraham
Copy link
Contributor Author

Thanks all! 🚀

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

Successfully merging a pull request may close this issue.

3 participants