Open raveclassic opened 4 years ago
Add the following type to rx-utils
interface Behavior<A> extends Observable<A> { readonly getValue: () => A; }
so that we could use it as both a value-over-time and an Observable.
Also add typeclass instance (you can use rxjs's internal _subscribe method to deal with Observable#subscribe which cannot be overridden due to messy overloadings):
rxjs
_subscribe
Observable#subscribe
export const instance: Functor<URI> & FoldableValue<URI> = { ... } export const behavior = { ...instance, ...pipeable(instance) }
Add the following type to rx-utils
so that we could use it as both a value-over-time and an Observable.
Also add typeclass instance (you can use
rxjs
's internal_subscribe
method to deal withObservable#subscribe
which cannot be overridden due to messy overloadings):