UNPKG

276 BTypeScriptView Raw
1type Subscription<T> = (val: T) => void;
2export declare class EventEmitter<T> {
3 private subscriptions;
4 emit: (val: T) => void;
5 useSubscription: (callback: Subscription<T>) => void;
6}
7export default function useEventEmitter<T = void>(): EventEmitter<T>;
8export {};