feature: parallel should support limit Infinity and OnlyPositiveNumbers #235
Closed
MarlonPassos-git
started this conversation in
Ideas
Replies: 2 comments 2 replies
-
Definitely agree on Infinity. I'd be fine with clamping anything less than 1 to be equal to 1. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Problem:
Currently, when we pass Infinite it throws an error
It's easy to fix it with.
This can also be good because if the person passes a value in parallels that is greater than the size of the array, we don't create unnecessary things.
but testing this I ended up realizing that if I pass 0 or a negative number it doesn't work either.
I think it would be interesting to deal with this case, in the code we could validate that the number has to be greater than 0
and on the typescript side I think we could use this type to enforce positive values with this type
However, in this case, I have doubts whether this would be a major change. 🤔
Related Issues
sodiray/radash#426
Beta Was this translation helpful? Give feedback.
All reactions