UNPKG

react-elegant-ui

Version:

Elegant UI components, made by BEM best practices for react

12 lines (11 loc) 315 B
type Callback<T> = (value: T) => void; /** * Simple event channel to send and handle messages */ export declare class SimpleEventChannel<T> { protected handlers: Set<Callback<T>>; subscribe: (fn: Callback<T>) => void; unsubscribe: (fn: Callback<T>) => void; send: (value: T) => void; } export {};