title: NodeJS EventEmitter with TypeScript class
body: <p>Is it possible to use NodeJS' <code>events.EventEmitter</code> with a TypeScript class? If yes, how?</p>
  
  <p>I've tried countless variations in the last hours to get this working, so I won't list any of them.</p>
  
  <p>What I basically want to do:</p>
  
  <pre><code>export class Database{
      constructor(cfg:IDatabaseConfiguration) {
          // events.EventEmitter.call(this); 
          mongoose.connect(cfg.getConnectionString(), cfg.getCredentials(), function (err:any) {
              if (err)
                  this.emit('error', err);
              else
                  this.emit('ready');
          });
      }
  }
  </code></pre>