I've been using Basarats's excellent Collections library slightly updated for 0.9.0 creating types such as:
Dictionary<ControlEventType,
Dictionary<number, (sender: IControl,
eventType: ControlEventType,
order: ControlEventOrder,
data: any) => void >>
Now I don't want to have to write this in full every time I use it. One of the approaches which seems to work is:
export class MapEventType2Handler extends C.Dictionary<ControlEventType,
C.Dictionary<number,
(sender: IControl,
eventType: ControlEventType,
order: ControlEventOrder,
data: any) => void >> {}
I can then write:
EH2: MapEventType2Handler = new MapEventType2Handler();
instead of:
EH: Dictionary<ControlEventType,
Dictionary<number,
(sender: IControl,
eventType: ControlEventType,
order: ControlEventOrder,
data: any) => void >>;
Anyone come across any better ideas?
I am also experimenting with 'typedeffing' various function signatures without great results.