use-app-events
Version:
Create, trigger and listen for custom events in vanilla JavaScript and React.
12 lines (11 loc) • 520 B
TypeScript
type UseAppEventsProps = {
debug: boolean;
};
/** Hook for managing application events. */
declare const useAppEvents: <EventType extends string>(props?: UseAppEventsProps) => {
listenForEvents: import('../../base/listenForEvents/types').BaseListenForEvents<EventType> & {
once: import('../../base/listenForEvents/types').BaseListenForEvents<EventType>;
};
notifyEventListeners: import('../../base/notifyEventListeners/types').BaseNotifyEventListeners<EventType>;
};
export default useAppEvents;