Closed agabriele-radius closed 3 years ago
I often end up needing a way to use MonoTypeOperatorFunction's on the right case of ObservableEither's
right
ObservableEither
E.g. filter or takeUntil for ObservableEither
export const liftEither = <E, A, B>( f: (a: r.Observable<A>) => r.Observable<B> ): ((a: OBE.ObservableEither<E, A>) => OBE.ObservableEither<E, B>) => flow( OB.separate, ({left, right}: {left: r.Observable<Err>; right: r.Observable<A>}) => r.merge(pipe(left, ro.map(E.left)), pipe(right, f, ro.map(E.right))) )
I can make a P.R. if desired, but I'm not sure if this is the best way to do this.
whoops wrong github acct
I often end up needing a way to use MonoTypeOperatorFunction's on the
right
case ofObservableEither
'sE.g. filter or takeUntil for
ObservableEither
I can make a P.R. if desired, but I'm not sure if this is the best way to do this.