title: Type 'Observable<unknown>' is missing the following properties from type 'Promise<any>
body: <p>I am upgrading angular  application to angular 8 and getting the following error
  What I have changed is to make the promise pipeable </p>
  
  <pre><code>     Type 'Observable&lt;unknown&gt;' is missing the following properties
      from type 'Promise&lt;any&gt;': then, catch, [Symbol.toStringTag]
  return this.http.post(this._checkExecuteTradeUrl, requestBody, this.getRequestHeaders())
         .pipe(toPromise());
  </code></pre>
  
  <p>My current code is </p>
  
  <pre><code>import { map, tap, toPromise } from 'rxjs/operators';
  
  public CheckExecuteTrade(model: TradeNotification): Promise&lt;any&gt; {
  
          const header = new HttpHeaders({ 'Content-Type': 'application/json' });
  
          const requestBody = JSON.stringify(model);
          return this.http.post(this._checkExecuteTradeUrl, requestBody, this.getRequestHeaders())
              .pipe(toPromise());
      }
  </code></pre>