title: MouseEvent in TypeScript error not matching signature
body: <p>I am trying to construct and dispatch a <code>MouseEvent</code> in TypeScript.
  The <code>simulateClick()</code> example from <a href="https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Creating_and_triggering_events" rel="nofollow">mozilla.org</a> gives a compile error calling the constructor:</p>
  
  <p>"Supplied parameters do not match any signature of call target."</p>
  
  <pre><code>function simulateClick() {
      var event = new MouseEvent('click', {
          'view': window,
          'bubbles': true,
          'cancelable': true
      });
      var cb = document.getElementById('checkbox');
      var canceled = !cb.dispatchEvent(event);
      if (canceled) {
          // A handler called preventDefault.
          alert("canceled");
      } else {
          // None of the handlers called preventDefault.
          alert("not canceled");
      }
  }
  </code></pre>
  
  <p>I have tried inserting a cast <code>&lt;MouseEventInit&gt;</code> before the parameter dictionary, but that results in the same error.</p>
  
  <p>Even the following results in the same error:</p>
  
  <pre><code>new MouseEvent('click', &lt;MouseEventInit&gt;null);
  </code></pre>
  
  <p>Although it looks like it matches the prototype in <code>lib.d.ts</code>:</p>
  
  <pre><code>new(typeArg: string, eventInitDict?: MouseEventInit): MouseEvent;
  </code></pre>
  
  <p>Workaround:</p>
  
  <pre><code>var event: MouseEvent = new (&lt;any&gt;MouseEvent)('click',
      { 'view': window, 'bubbles': true, 'cancelable': true });
  </code></pre>