dx-platform
dx-platform copied to clipboard
Add Behavior type
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):
export const instance: Functor<URI> & FoldableValue<URI> = { ... }
export const behavior = {
...instance,
...pipeable(instance)
}