This module provides support for typed events,
wether is for classes that emit a particular
event, and allowing others to subscribe to that
event emission, or by simply creating objects that
can emit and be subscribed to.
The main and only class exported is EventEmitter,
which can be extended (the preferred way) or instantiated.
Events are typed so typescript support is a fully implemented
through generics.
The following is an example of how to create a class that emits
some events.
This module provides support for typed events, wether is for classes that emit a particular event, and allowing others to subscribe to that event emission, or by simply creating objects that can emit and be subscribed to.
The main and only class exported is EventEmitter, which can be extended (the preferred way) or instantiated. Events are typed so typescript support is a fully implemented through generics.
The following is an example of how to create a class that emits some events.
Example
Author
Alan Rodas Bonjour alanrodas@gmail.com