I am just wondering if in TypeScript you can define custom events on your classes or interfaces?
What would this look like?
If you are looking to get intelli-sense type checking using the standard emitter pattern you can now do the following:
type DataEventType = "data";
type ErrorEventType = "error";
declare interface IDataStore extends Emitter {
on(name: DataEventType, handler : (data: TResponse) => void);
on(name: ErrorEventType, handler: (error: any) => void);
}