You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, there is a limit on the number of functions that can be passed to pipe (9).
We could have an overload that receives an array, to remove this limit.
This would also allow the use case of spreading an array of any length (rather than a tuple) into pipe: pipe(...myFns). However I would question if doing this is ever a good idea.
One downside of having this array overload is: type inference would disappear when you reach a certain threshold—pipe would return an function that returns unknown.
We tried to add this in the past, however we ran into a TS issue: #3.
Unfortunately this issue we ran into is expected TS behaviour: microsoft/TypeScript#32269 (comment). Therefore this is currently a non-option (unless someone can find another a way around this issue).
The text was updated successfully, but these errors were encountered:
Currently, there is a limit on the number of functions that can be passed to
pipe
(9).We could have an overload that receives an array, to remove this limit.
This would also allow the use case of spreading an array of any length (rather than a tuple) into
pipe
:pipe(...myFns)
. However I would question if doing this is ever a good idea.One downside of having this array overload is: type inference would disappear when you reach a certain threshold—
pipe
would return an function that returnsunknown
.We tried to add this in the past, however we ran into a TS issue: #3.
Unfortunately this issue we ran into is expected TS behaviour: microsoft/TypeScript#32269 (comment). Therefore this is currently a non-option (unless someone can find another a way around this issue).
The text was updated successfully, but these errors were encountered: