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 compose requires that returned value was a stream of transformed values.
What about allowing to return arbitrary type of value?
constpartition=<T>(predicate: (item: T)=>boolean)=>(stream: Stream<T>)=>[stream.filter(predicate),stream.filter(item=>!predicate(item))]// this would allow such syntaxconst[good$,bad$]=source$.compose(partition(filterGood))// vs const[good$,bad$]=partition(filterGood)(source$)
Or you see compose as strictly Stream to Stream transformation function? (though JS without TS version still allows to do this)
The text was updated successfully, but these errors were encountered:
@whitecolor This is interesting. I thought it would hurt typings elsewhere, but I gave it a try, and we can easily do this with zero difference for JS users, and no breaking changes for anyone (JS or TS users). It's just a backwards compatible feature. It's an easy win, so why not.
Currently
compose
requires that returned value was a stream of transformed values.What about allowing to return arbitrary type of value?
Or you see
compose
as strictly Stream to Stream transformation function? (though JS without TS version still allows to do this)The text was updated successfully, but these errors were encountered: