title: Returning an array of strings from httpClient using Observables
body: <p>I have an API endpoint that's returning an array of strings (json) and I'm trying to create a page that spits out the contents via an Angular Service.  Here's what I have thus far (I'm on Angular 7):</p>
  
  <pre><code>export class FieldService {
    constructor(private httpClient: HttpClient) { }
  
    fieldTypesURL = 'http://localhost:3000/fields/types';
  
    public getTypes(): Observable&lt;any[]&gt; {
      return this.httpClient.get&lt;any[]&gt;(this.fieldTypesURL)
      .pipe(map((response: any) =&gt; response.json()),
        catchError((error: any) =&gt; Observable.throw(error.json().error || 'Server error')));
    }
  }
  </code></pre>
  
  <p>The compilation error I'm getting is the following:</p>
  
  <pre><code>Type 'Observable&lt;any[]&gt;' is missing the following properties from type 'Promise&lt;string[]&gt;': then, catch, [Symbol.toStringTag], finally
  </code></pre>
  
  <p>Why is it mentioning a Promise here while I'm trying to use an Observable?  Any ideas welcome!</p>