title: Improve typescript for using constructors on an array
body: <p>I have the following code that is working, but I feel like there is a much simpler way of doing this with rxjs. Does anyone know how this can be simplified? The main reason for the complexity is I need to run the custom constructor on each item in the array before I can return it to the subscribing method. (Angular 8.2.3, Typescript 3.5.3, rxjs 6.4.0)</p>
  <pre><code>getAllthings() : Observable&lt;Object&gt;{
      const apiUrl = `${this.baseUrl}/things`;
      return this.http.get&lt;Array&lt;Thing&gt;&gt;(apiUrl).pipe(
        map((itemsArray) =&gt; {
          itemsArray.forEach(function(item, index, array) {
            array[index] = new Thing(item);
          });
  
          return itemsArray;
        }));
    }
  </code></pre>