This wrapper around EventTarget provides more descriptive type information. By using this class, calls to EventTarget
methods are correctly type checked to ensure only allowed event types are used, and that events and their type
strings are correctly associated.
For example, when calling TypedEventTarget::addEventListener, the event passed to the callback will have the correct
type corresponding to the type of event for which the listener has been added.
This wrapper around EventTarget provides more descriptive type information. By using this class, calls to EventTarget methods are correctly type checked to ensure only allowed event types are used, and that events and their type strings are correctly associated.
For example, when calling TypedEventTarget::addEventListener, the event passed to the callback will have the correct type corresponding to the type of event for which the listener has been added.