title: Type 'Observable<unknown>' is not assignable to type 'Observable<ApiResponse>'
body: <p>In an Angular project, I have a function defined in my service that is supposed to call my API.</p>
  <p>This function looks like this:</p>
  <pre><code>apiCall(type: string, path: string, params: string[], data: any, headers?: HttpHeaders) {
  let result = new Observable();
  result = this.http.get(API_URL + '/' + path, {headers});
  
  return result.pipe(
        tap(
          (response: ApiResponse) =&gt; {
            // console.log(response);
            return {...response};
          }),
        catchError(this.handleError())
      );
  }
  </code></pre>
  <p>However, on this last line of code I get the following error:</p>
  <pre><code>TS2345: Argument of type 'MonoTypeOperatorFunction&lt;ApiResponse&gt;' is not assignable to parameter of type 'OperatorFunction&lt;unknown, ApiResponse&gt;'.   Types of parameters 'source' and 'source' are incompatible.     Type 'Observable&lt;unknown&gt;' is not assignable to type 'Observable&lt;ApiResponse&gt;'.       Type 'unknown' is not assignable to type 'ApiResponse'.
  </code></pre>
  <p>I tried to search for this error, but I haven't find a solution anywhere.</p>
  <p>The weird thing is that this same code was working in other projects so I don't understand what's wrong</p>