Reactive Extensions bindings for the KnockoutJS
Package: knockout.rx
PM> Install-Package knockout.rx
Or you can download it from Releases of the project.
For typeScript users typing definition could be found here.
var rxObservable = koSubscribable.toObservable(event?: string);
rxObservable
return - resulting Rx observable objectkoSubscribable
- source Knockout subscribable object (observable, computed)event
optional - event of subscribable to observe; if not specified, used default event for this subscribable (usually 'change' event).
var rxObservable = koObservableOrComputed.toObservableWithReplyLatest();
rxObservable
return - resulting Rx observable objectkoObservableOrComputed
- source Knockout observable or computed object
Note: toObservableWithReplyLatest
returns Rx observable that will notify every observer with latest (current) Ko observable (or computed) value once it subscribed.
var koObservable = rxObservable.toKoObservable(initialValue?: any);
koObservable
return - resulting Knockout observable objectrxObservable
- source Rx observable objectintialValue
optional - initial value to keep in resulting Knockout observable before first notification from source Rx observable
var koSubscribable = rxObservable.toKoSubscribable();
koSubscribable
return - resulting Knockout subscribable objectrxObservable
- source Rx observable object
Note: The knockout subscribable does not store last value as Knockout observable do, it used only for change notifications. Exactly like Rx observable.