Currently working on an application built with Angular2 in TypeScript, utilizing rxjs 5.
Edit: Just to clarify, I am still relatively new to the Rx library and looking for the best practices. I did try to find some answers in the documentation before seeking help on SO.
Here's what I have:
class Result { constructor(public inError: boolean) { } }
const checks: Array<() => Observable<Result>> = [...];
This array consists of functions, each returning an observable that holds a Result object.
What I need:
- I would like to 'map' this array into an
Array<Observable<Result>>
, by executing each function sequentially ... - ... but I want to stop mapping as soon as the first
Result.inError
is true!
I've been trying various combinations of reduce
, takeWith
, contains
, etc...
The deferred nature of Observables is causing confusion.
Any assistance would be appreciated greatly!