Interface IEventDispatcher<T>
Methods
addEventListener
- addEventListener(type: T, listener: (event: IEvent<T>) => void): void
Parameters
- type: T
- listener: (event: IEvent<T>) => void
Returns void
dispatchEvent
- dispatchEvent(event: IEvent<T>): void
Parameters
- event: IEvent<T>
[attachment: string]: any
Optional
target?: any
type: T
Returns void
hasEventListener
- hasEventListener(type: T, listener: (event: IEvent<T>) => void): boolean
Parameters
- type: T
- listener: (event: IEvent<T>) => void
Returns boolean
removeEventListener
- removeEventListener(type: T, listener: (event: IEvent<T>) => void): void
Parameters
- type: T
- listener: (event: IEvent<T>) => void
Returns void
A simple event dispatcher interface with IEvent as event type.