title: Property is missing in type but required in type
body: <p>I'm trying to implement simple event dispatcher on TypeScript.</p>
  <p>My custom types are declared like this:</p>
  <p><code>events.d.ts</code>:</p>
  <pre><code>type AppEvent = { [key: string]: any }
  
  type AppEventListener&lt;T&gt; = &lt;T extends AppEvent&gt;(event: T) =&gt; void;
  </code></pre>
  <p>When I pass any object in this function</p>
  <pre><code>   public addListener&lt;T extends AppEvent&gt;(event: T, listener: AppEventListener&lt;T&gt;)
  </code></pre>
  <p>I get the following error:</p>
  <pre><code>Argument of type '(event: TestEvent) =&gt; void' is not assignable to parameter of type 'AppEventListener&lt;typeof TestEvent&gt;'.
     Types of parameters 'event' and 'event' are incompatible.
       Type 'T' is not assignable to type 'TestEvent'.
         Property 'name' is missing in type 'AppEvent' but required in type 'TestEvent'.
  </code></pre>
  <p>So, this type <code>AppEvent</code> cannot have any additional properties. How to make it work? Any help appreciated.</p>
  <p>Full code example:</p>
  <pre><code>class EventDispatcher {
    private listeners: Map&lt;AppEvent, Array&lt;AppEventListener&lt;AppEvent&gt;&gt;&gt;
  
    constructor() {
      this.listeners = new Map();
    }
  
    public dispatch&lt;T extends AppEvent&gt;(event: T): void {
      const listeners = this.listeners.get(event.constructor);
      if (listeners) {
        listeners.forEach((callback) =&gt; {
          callback(event);
        });
      }
    }
  
    public addListener&lt;T extends AppEvent&gt;(event: T, listener: AppEventListener&lt;T&gt;): void {
      let listeners = this.listeners.get(event);
      if (!listeners) {
        listeners = [listener];
        this.listeners.set(event, listeners);
      } else {
        listeners.push(listener);
      }
    }
  }
  
  class TestEvent {
    public name: string = ''
  }
  
  const dispatcher = new EventDispatcher();
  const listener = (event: TestEvent) =&gt; {
    console.dir(event);
  };
  dispatcher.addListener(TestEvent, listener);
  
  const event = new TestEvent('name');
  dispatcher.dispatch(event);
  
  </code></pre>