title: TS2339: Property 'map' does not exist on type 'Object'
body: <p>I have the following code:</p>
  
  <pre><code>import { Injectable } from '@angular/core';
  import { HttpClient } from '@angular/common/http';
  import { Observable } from 'rxjs/Observable';
  import 'rxjs/add/operator/catch';
  import { map } from 'rxjs/operators';
  
  interface SingleParamConstructor&lt;T&gt; {
    new (response: any): T;
    id: T;
  }
  
  @Injectable()
  export class RestProvider&lt;T&gt; {
    baseUrl:string = "http://localhost:3000";
  
    constructor(private ctor: SingleParamConstructor&lt;T&gt;, private httpClient : HttpClient) { }
  
    public getEntities&lt;T&gt;(): Observable&lt;T[]&gt; {
      return this.httpClient
        .get(this.baseUrl + '/products')
        .pipe(map(entities =&gt; {
          return entities.map((entity) =&gt; new this.ctor(entity));
        }))
        .catch((err) =&gt; Observable.throw(err));
  
    }
  }
  </code></pre>
  
  <p>When I try the code above I get the <code>TS2339: Property 'map' does not exist on type 'Object'</code>.</p>
  
  <p>The responsible line is: <code>return entities.map((entity) =&gt; new this.ctor(entity));</code></p>
  
  <p>What is it that I'm doing wrong and how can I map over <code>entities</code>?</p>