Generic observable.
Signature:
export interface Emitter<T>
Method | Description |
---|---|
addListener(listener, options) | Sets up a function that will be called whenever the target changes. |
off(listener) | Unregisters a listener. |
on(listener) | Registers a listener. |
once(listener) | Registers a listener then unregisters the listener after one event emission. |
removeListener(listener) | Removes from the listener previously registered with addListener. |