I provide a typescript definition file for a non-ts library I've written. My library extends EventEmitter2 as a "native" event system so I'm trying to determine how to define that:
/// <reference types="eventemitter2" />
declare module "my-module" {
class MyClass extends EventEmitter2 {
// ...
}
}
... which doesn't work. EventEmitter2 provides a d.ts file so it should be available, but the error I get is:
Cannot find name 'EventEmitter2'
I don't work with ts enough to know where I'm going wrong. I've tried reading docs/looking for examples but nothing seems to address this type of issue.