title: Typescript generic with constraint isn't assignable to generic interface
body: <p>I get an error in TypeScript 2.4.2 on a generic class with a constraint not being compatible with the interface which is less strict. I get the following error:</p>
  
  <blockquote>
    <p>ts/components/Schedule.ts(37,13): error TS2322: Type '{ personWeekView: PlanItemScheduleView; projectWeekView: PlanItemScheduleView; r...' is not assignable to type 'Map'.
      Property 'personWeekView' is incompatible with index signature.
        Type 'PlanItemScheduleView' is not assignable to type 'IPlanItemScheduleView'.
          Types of property 'onAddedItem' are incompatible.
            Type '(item: T, initial: boolean) => void' is not assignable to type '(item: T, initial: boolean) => void'.
              Types of parameters 'item' and 'item' are incompatible.
                Type 'T' is not assignable to type 'PlanItem'.</p>
    
    <p>ts/views/PlanItemScheduleView.ts(2,18): error TS2420: Class 'PlanItemScheduleView' incorrectly implements interface 'IPlanItemScheduleView'.
      Types of property 'onAddedItem' are incompatible.
        Type '(item: T, initial: boolean) => void' is not assignable to type '(item: T, initial: boolean) => void'.
          Types of parameters 'item' and 'item' are incompatible.
            Type 'T' is not assignable to type 'PlanItem'.</p>
    
    <p>ts/views/PlanItemScheduleView.ts(99,79): error TS2345: Argument of type 'this' is not assignable to parameter of type 'IControllerListener'.
      Type 'PlanItemScheduleView' is not assignable to type 'IControllerListener'.
        Types of property 'onAddedItem' are incompatible.
          Type '(item: T, initial: boolean) => void' is not assignable to type '(item: T, initial: boolean) => void'.
            Types of parameters 'item' and 'item' are incompatible.
              Type 'T' is not assignable to type 'PlanItem'.</p>
  </blockquote>
  
  <p><strong>Interfaces</strong></p>
  
  <pre><code>namespace Planning {
      export interface IPlanItemScheduleView extends IView, IControllerListener&lt;IPlanItem&gt; {
          setTimespan(timespan: Timespan): void;
          getName(): string;
      }
  }
  namespace Planning {
      export interface IControllerListener&lt;T&gt; {
      /**
       * Notifies the listener that an item is added to the cache so it can add it to its view.
       * 
       * @template T
       * @param {T} item
       * @param {boolean} initial
       * 
       * @memberOf IControllerListener
       */
      onAddedItem&lt;T&gt;(item: T, initial: boolean): void;
      }
  }
  
  namespace Planning {
      export class PlanItemScheduleView&lt;T extends PlanItem&gt; implements IPlanItemScheduleView {
  
          public onAddedItem&lt;T extends PlanItem&gt;(item: T, initial: boolean): void {
              // implementation that needs properties on PlanItem
          }
      }
  }
  </code></pre>
  
  <p>PlanItem is an abstract baseclass which is inherited by a few actual implementations. I have a few different kind of viwes that I construct like this:</p>
  
  <pre><code>  // Create the different views
    this._views = {
              personWeekView: new PlanItemScheduleView&lt;Person&gt;(this._options, this._logger, this),
              projectWeekView: new PlanItemScheduleView&lt;Project&gt;(this._options, this._logger, this),
              resourceWeekView: new PlanItemScheduleView&lt;Resource&gt;(this._options, this._logger, this),
          };
  </code></pre>
  
  <p>I thought I had this compiling before in an other version of tsc but I might be mistaken. How can I fix this?</p>