js-util

Home > rc-js-util > IBroadcastEvent

IBroadcastEvent interface

Simple one to many communication channel. Proxies the arguments of emit to each listener.

Signature:

export interface IBroadcastEvent<TKey extends string, TArgs extends unknown[]> 

Methods

Method Description
addListener(listener)  
addOneTimeListener(listener) Like addListener but unregisters after first event.
addTemporaryListener(listener)  
emit(args)  
getTargets()  
removeListener(listener)