addListener Method

Registers a Listener to be executed whenever this event is raised.

addListener(listener: T extends Listener, scope?: any): () => void

see BeEvent.raiseEvent, BeEvent.removeListener

Parameter Type Description
listener T extends Listener The function to be executed when the event is raised.
scope any An optional object scope to serve as the 'this' pointer when listener is invoked.

Returns - A function that will remove this event listener.

Defined in

Last Updated: 13 October, 2019