title: Why is the rxjs pipe function in my httpclient returning Observable<Response | myClass>
body: <p>In this code</p>
  
  <pre class="lang-js prettyprint-override"><code>getHero(id: number): Observable&lt;Hero&gt; {
    const url = `${this.heroesUrl}/${id}`;
    return this.http.get&lt;Hero&gt;(url).pipe(
      tap(_ =&gt; this.log(`fetched hero id=${id}`)),
      catchError(this.handleError&lt;Hero&gt;(`getHero id=${id}`))
    );
  }
  </code></pre>
  
  <p>from the Angular documentation <a href="https://angular.io/tutorial/toh-pt6" rel="nofollow noreferrer">here</a>
  working fine, whereas in my project, "identical" code is giving me the error </p>
  
  <blockquote>
    <p>error TS2322: Type 'Observable' is not assignable to type 'Observable'.</p>
  </blockquote>
  
  <p>after upgrading to angular 6?</p>
  
  <pre class="lang-js prettyprint-override"><code>public getCustomer(customerRecId: string): Observable&lt;Customer&gt; {
    const url = `${this.baseUrl}/Customer?recId=${customerRecId}`;
    const customer$ = this.http.get(url, this.httpOptions).pipe(
      map(this.mapCustomer), 
      catchError(this.handleError)
    );
  
    return customer$;
  }
  </code></pre>
  
  <p>Hovering over the '.pipe' in vsCode shows in the former example it is returning an Observable but in the latter an Observable</p>
  
  <p>I don't understand why the two examples differ.</p>