Here an example that explain what i\'m asking!
// Given an events definition interface IEventDef { event1: () => void, event2: (data: T) => voi