title: TypeScript Generic Classes: Cannot assign to Generic Type Variable
body: <p>I'm trying to use Generic interfaces for my classes.
  My Class has a generic Type which Extends an interface and a class variable with that Type. But as soon as I try to assign a value to that variable the compiler gives me an error.(Example: Class A)</p>
  
  <p>When I don't extend the Generic Type it works. (Example: Class B)</p>
  
  <pre><code>//Generic Classes problem
  interface MyStateInterface {
      test?: number
  }
  
  class A&lt;IState extends MyStateInterface&gt; {
      protected state: IState;
  
      constructor() {
          // Error here
          this.state = {
              test: 1
          };
      }
  }
  
  class B&lt;IState extends MyStateInterface&gt; {
      protected state: MyStateInterface;
  
      constructor() {
          this.state = {
              test: 1
          };
      }
  }
  </code></pre>
  
  <p>Does anyone have a solution to this problem?</p>