Evented
Event emitter
new constructor
()
Returns
Methods
emit
(type, data?)
Calls all event listeners with event type type
Parameters
type
K
Event type
data?
M[K]
Data transferred to events
Returns
this
off
(type, listener)
Removes event listener registered with on
Parameters
type
K
Event type
listener
(ev: M[K]) => void
Event handler
Returns
this
on
(type, listener)
Registers event listener
Parameters
type
K
Event type
listener
(ev: M[K]) => void
Event handler
Returns
this
once
(type, listener)
Registers event listener which will be called once
Parameters
type
K
Event type
listener
(ev: M[K]) => void
Event handler
Returns
this