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

Fix error and remove useIf #2

Closed
JanMalch opened this issue Oct 8, 2020 · 0 comments · Fixed by #5
Closed

Fix error and remove useIf #2

JanMalch opened this issue Oct 8, 2020 · 0 comments · Fixed by #5

Comments

@JanMalch
Copy link
Owner

JanMalch commented Oct 8, 2020

The return type of error should be never. This way useIf can be removed as it can now be easily replaced (and its signature was overly complicated):

const bar = useIf(isDefined)(foo);
const baz = isDefined(foo) ? foo : error();
@yoha-dev yoha-dev mentioned this issue Oct 29, 2020
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 a pull request may close this issue.

1 participant