Closed justinwoo closed 6 years ago
Haven't looked at RxJS5 in a while, but I don't see any reason why this project shouldn't move to using that.
Cool, I'll try to start upgrading to RxJS5 sometime and see if it'll work.
Sounds good!
btw, there are no more subscribeOnError
or subscribeOnComplete
in rxjs5. I think for the sake of having clean code in general and not having multiple subscriptions, it'd be nicer if subscribe took a record of {next, error, complete}
. Then a defaultSubscription
could be provided that would log the values/errors and do nothing on complete. What do you think?
I think there is a way in all the Rx implementations to only subscribe to onNext: you can just pass in the first argument to subscribe in RxJS and in Java the subscribe
is overloaded to take 1,2,3 arguments. I could be wrong though. But if this is true I think we could just keep the specialized functions.
That said, maybe subscribe
should take all three arguments always, and if you really do not want to handle errors for example, then use the specialized functions.
I rewrote those to just use the appropriate signature of subscribe as in RxJS4, but I guess it wouldn't be too bad to switch subscribe
and subscribe'
.
I've done a complete re-wrap using RxJS 5.*. See this repo. There are breaking changes in the RxJS5 API.
I've wrapped (virtually) the entire API, including subjects and schedulers.
@anttih If you're open to changes as reflected in the repo, please let me know and I'll submit a PR.
Once tests are written, and the imports/docs are cleaned-up, I plan to ask @paf31 to add RxJS 5.* to purescript-contrib.
@jasonzoladz looks good! I would gladly take a PR for this. I have some questions about the code but we can discuss it in the PR.
I'm wondering if you have any plans to move this to RxJS5, since it's much faster, more debuggable, etc.
But if you're already using this quite a lot with RxJS4, maybe not worth the hassle?