How to use exhaustMap in ReactiveX/rxjs 5 in TypeScript
<p>I was wondering how can I process an array where each value returns a Promise in the same order as they're specified. For example, let's say I want to call multiple Ajax calls in this order:</p>

<pre><code>var array = [
    'http://example.org',
    'http://otherexample.org',
    'http://anotherexample.org',
];
</code></pre>

<p>There's basicaly the same question: <a href="https://stackoverflow.com/questions/32783559/how-can-i-use-rxjs-to-hold-off-any-requests-for-an-ajax-call-until-the-previous">How can I use RxJs to hold off any requests for an AJAX call until the previous one resolves</a>, which suggests using <code>flatMapFirst</code>.</p>

<p>Since I'm using Angular2 (<code>beta-15</code> at this moment) in TypeScript which uses <code>rxjs@5.0.0-beta.2</code> I found out that <a href="https://github.com/ReactiveX/rxjs/blob/5.0.0-beta.2/MIGRATION.md#operators-renamed-or-removed" rel="nofollow noreferrer"><code>flatMapFirst</code> has been renamed to <code>exhaustMap</code></a>.</p>

<p>But this operator isn't listed in <a href="https://github.com/ReactiveX/rxjs/blob/5.0.0-beta.2/src/Observable.ts" rel="nofollow noreferrer">Observable.ts</a>, therefore I can't use it. It's not even present in the bundled version of RxJS <a href="https://code.angularjs.org/2.0.0-beta.15/Rx.js" rel="nofollow noreferrer">https://code.angularjs.org/2.0.0-beta.15/Rx.js</a>.</p>

<p>So, how am I supposed to use it? Or is there any other way to the what I need? Its <a href="https://github.com/ReactiveX/rxjs/blob/5.0.0-beta.2/package.json" rel="nofollow noreferrer">package.json</a> lists a lot of build scripts, should I force it to use one of them?</p>

<p>Edit: I should mention I'm using <a href="https://github.com/ReactiveX/rxjs" rel="nofollow noreferrer">ReactiveX/rxjs</a> library, not <a href="https://github.com/Reactive-Extensions/RxJS" rel="nofollow noreferrer">Reactive-Extensions/RxJS</a></p>