use-app-events
Version:
Create, trigger and listen for custom events in vanilla JavaScript and React.
8 lines (7 loc) • 329 B
TypeScript
import { BaseListenForEvents } from '../base/listenForEvents/types';
import { Extend } from '../types';
type ListenForEvents<EventType extends string = string> = Extend<BaseListenForEvents<EventType>, {
once: BaseListenForEvents<EventType>;
}>;
declare const listenForEvents: ListenForEvents;
export default listenForEvents;