event library

Represents an Event as some number of handlers (subscribers) that can be notified when a condition occurs.

See also EventArgs.

Classes

Event<T extends EventArgs>
Represents an Event as some number of handlers (subscribers) that can be notified when a condition occurs, by using the broadcast method.
EventArgs
Represents data (arguments) that is provided to subscribers when an Event occurs. It includes two values:- whenOccurred - the date/time the Event is broadcast, and eventName - an optional name that can be used to identify the associated event.
Value<T>
An EventArgs derived class with one (generic) value.
Values<T1, T2>
An EventArgs derived class with two (generic) values.

Typedefs

EventHandler<T extends EventArgs> = void Function(T args)
Defines the function (callback) signature of an Event handler. It is a function that takes an argument of type EventArgs, or one derived from it.