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.
MDN Reference
A custom event with strict types for details and the event's
typeproperty.