title: Asynchronous equivalent to tap() in RxJS?
body: <p>I have a side effect Observable that's required to be resolved before the main Observable is completed. If it were a synchronous operation, I could use the <code>tap()</code> operator. Is there a clear equivalent for an asynchronous operation?</p>
  
  <p>In the following example, I have to map the inner value back to the outer value I actually want to pipe through. How would I avoid this mapping?</p>
  
  <pre><code>  const user = requestUser().pipe( 
      switchMap(user =&gt; {
        return requestAndAssignToken(user)
          .pipe(
            map(token =&gt; user)
          );
      })
    );
  </code></pre>