UNPKG

@downpourdigital/dispatcher

Version:
15 lines (14 loc) 566 B
import Subscribable from './Subscribable'; import PersistentEvent from './PersistentEvent'; interface EventDispatcherProps { mayCancelAfterCallback?: boolean; } export default class EventDispatcher<PayloadType> extends Subscribable<PayloadType> { protected events: PersistentEvent<PayloadType>[]; protected mayCancelAfterCallback: boolean; constructor(props?: EventDispatcherProps); dispatchPassive(payload?: PayloadType): void; dispatch(payload?: PayloadType): PersistentEvent<PayloadType>; cancelAll(): void; } export {};