title: RxJS's lettable operators breaks generic typings?
body: <p>I have  a basic Angular  <a href="https://angular.io/api/common/http/HttpInterceptor" rel="nofollow noreferrer">HttpIntereceptor</a> which returns <code>Observable&lt;HttpEvent&lt;any&gt;&gt;</code></p>
  
  <pre><code>intercept(req: HttpRequest&lt;any&gt;, next: HttpHandler) : Observable&lt;HttpEvent&lt;any&gt;&gt;
          {
              return  next.handle(req);
          }
  </code></pre>
  
  <p>This is working fine.</p>
  
  <p>I wanted to add a side effect function so I used <code>.do</code> operator : </p>
  
  <pre><code> return  next.handle(req).do(f=&gt; ()=&gt;{/*.somethinbg.*/});
  </code></pre>
  
  <p>This also  works.</p>
  
  <p>But now I wanted to use the lettable operator <code>tap</code> which is the replacement of <code>do</code>.</p>
  
  <p>So I did this: </p>
  
  <pre><code> log =  tap(x =&gt;{}, x =&gt;{});
  </code></pre>
  
  <p>But now , when I'm <em>"letting"</em> it , I get an error : </p>
  
  <p><a href="https://i.stack.imgur.com/QaLhQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QaLhQ.png" alt="enter image description here"></a></p>
  
  <p><strong>Question:</strong></p>
  
  <p>How can I use this lettable operator and still keep generics/types ?</p>
  
  <p><a href="https://stackblitz.com/edit/angular-fu3nou?file=app/1.ts" rel="nofollow noreferrer"><strong>ONLINE DEMO</strong></a></p>
  
  <p><em>Update:</em></p>
  
  <p>If I do this instead: </p>
  
  <pre><code>  return  next.handle(req).let( tap(x =&gt;{}, x =&gt;{}));
  </code></pre>
  
  <p>Then it does work. It's only when the function is outside , it makes errors.</p>