Interface EventHandler<EventMap>
Type Parameters
-
EventMap extends Record<string, ((...args) => any)>
Methods
addListener
- addListener<T>(this, name, listener): void
-
Type Parameters
-
T extends string | number | symbol
Parameters
-
this: void
-
name: T
-
listener: EventMap[T]
Returns void
removeListener
- removeListener<T>(this, name, listener): void
-
Type Parameters
-
T extends string | number | symbol
Parameters
-
this: void
-
name: T
-
listener: EventMap[T]
Returns void
Adds a listener for events with the specified name.