-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#143 Make Kefir.combine() also accept sources as objects #225
Conversation
Overall everything looks good. I'm happy with how API looks externally, and I only may have some comments on implementation detail when I get a chance to take a closer look. |
Do you still have plans to merge this in? It can be very convenient to use this feature with Mapped Types from the latest Typescript, see microsoft/TypeScript#12114 |
Yeah, sorry, I've forgot to give more feedback. Everything looks good so far, @32bitkid! If you'd like to finish this up, that would be awesome. |
6376726
to
cc1549e
Compare
@rpominov I've been meaning to wrap this up, as well. I took a stab at some documentation, let me know if you need anything else from me to get this merged in. |
Thank you very much for all the work, everything looks great! I'll merge this and release a new version tomorrow. |
Sorry, couldn't do it today. Very busy at work these days. I'll get to this tomorrow or at weekend. |
Merged and released. |
Thank you for all the work you do maintaining kefir. I'm just happy to
help. Cheers and happy 2017!
…On Sat, Dec 31, 2016 at 8:57 AM, Roman Pominov ***@***.***> wrote:
Merged and released.
Thank you again, and happy 2017!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://github.com/rpominov/kefir/pull/225#issuecomment-269870894>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAEe3lwmicSJe20rxUtYnjTH1-GsYtnbks5rNntZgaJpZM4Kcp0I>
.
|
Here is an implementation that enhances the existing combine method to accept objects as well as arrays:
Given key conflicts between active and passive observables, it will prefer active ones:
Mismatched (array/object) active and passive collections throw an exception.
After thinking about it, I think overloading
combine()
feels like a more predictable interface for new users and improves code readability. However, I'm open to switch it to its own method (it wouldn't take much abstraction from its current form to do that).I'll work on updating the documentation if this looks like a good approach/direction.