While experimenting with Ts, I encountered a roadblock
"use strict";
declare const require: any;
const EventEmitter : any = require('events').EventEmitter;
class Foo extends EventEmitter{ //*error* Type 'any' is not a constructor function type.
constructor() {
super();
}
}
I even attempted to link EventEmitter
to an interface type of mine, but faced the same issue.
Is there a way to expand a class using Typescript with commonjs modules?
Appreciate your help