Events
By Jems
A simple an basic implementation for creating and handling well-defined events by providing control about event triggering, subscription, and handling (Typescript included)
With events
you will be able to design better your classes by specifying well-defined events as members of your objects
and prototypes
, it allows you:
- Bring a better modeling from the real world use cases to your software.
- Manage the event triggering in an encapsulated way, which means that if you want (and this is the way it should be) just the
object
orprototype
that contains the event can trigger it. - Handle subscription in a better way by the usage of the events signature which will make the events more semantic and better handleable to the subscribers
- ??
work in progress