A custom event with strict types for details and the event's type property.
type
Readonly
The type read-only property of the Event interface returns a string containing the event's type. It is set when the event is constructed and is the name commonly used to refer to the specific event, such as click, load, or error.
MDN Reference
A custom event with strict types for details and the event's
typeproperty.