0no-co / wonka

🎩 A tiny but capable push & pull stream library for TypeScript and Flow
MIT License
709 stars 29 forks source link

toObservable supports spec only partially #84

Closed danielkcz closed 4 years ago

danielkcz commented 4 years ago

According to spec the subscribe method either accepts an object with next/error/complete properties or 3 callbacks. The toObservable seems to only support the former variant.

In the ideal world, it wouldn't be a problem. However, when I try to integrate with library that implements spec partially with the second (callbacks) approach, it hurts interoperability.

Unfortunately, I cannot do a ReasonML so I cannot offer much help. Hopefully, it's not a big problem for someone else.

danielkcz commented 4 years ago

@kitten Are you be able to look into this, please?

kitten commented 4 years ago

I’ve already taken a quick look a couple of days ago but am still pondering on how he’s to get this implemented 👍 I may take a stab today

danielkcz commented 4 years ago

@kitten Any chance you can take a stab at this soon?

kitten commented 4 years ago

@FredyC I do have a PR open, but I may have to delay v5 to get this out. It turns out the BuckleScript internals now compile all signals differently so I have to come up with a way to upgrade urql users to the future Wonka v5 without having them have v4 and v5 mixed within the same application.

Anyway, if I don't find a solution I'll roll back the v5 upgrade and will first release a v4 patch.