UNPKG

@ablestack/rdo

Version:

A library to facilitate building and running graphs of Reactive Domain Objects - connecting JSON data sources to reactive client applications

13 lines (12 loc) 438 B
export declare type eventType = 'nodeChange'; export declare type SubscriptionFunction<T> = (data: T) => void; export declare class EventEmitter<T> { private registry; constructor(); /** */ subscribe(eventType: eventType, func: SubscriptionFunction<T>): void; /** */ unsubscribe(eventType: eventType, func: SubscriptionFunction<T>): void; /** */ publish(eventType: eventType, data: T): void; }