title: Wait for two Observables then return a promise of a different Observable?
body: <p>I have two Observables of different types and what I would like to do is to wait for both to emit at least once then somehow immediately return a promise of a third Observable with yet another return type.</p>
  
  <p>Right now I have this:</p>
  
  <pre><code>return Observable.forkJoin([$A, $B])
      .do(() =&gt; {
          return $C;
      })
      .toPromise()
      .then(result =&gt; result);
  </code></pre>
  
  <p>Where <code>$A</code> is an <code>Observable&lt;AType&gt;</code> and <code>$B</code> is an <code>Observable&lt;BType&gt;</code> but I don't care what those results are, I just want to know when they've completed. <em>Then</em> I want to return a <code>toPromise</code> of <code>$C</code> which would be a <code>Promise&lt;CType&gt;</code>.</p>
  
  <p>For some reason this isn't working, I think it's returning a <code>Promise&lt;Void[]&gt;</code> or an <code>Observable&lt;Void[][]&gt;</code> or something like that but I'm not sure how to debug this. But I think I have the right idea because forkJoin seems to be "subscribing"/executing the first two promises and then I can see that it <em>is</em> waiting on both to resolve it's just the return type is wrong I think.</p>