type Payload = Record & { eventDescription: string; }; interface EventEmitProps { eventEmittingElement?: HTMLElement; payload?: Payload; tagName: string; } /** * Event Emitter * * Creates a namespaced event and emits it from given element. * * @returns namespaced event id string mostly for debuggin purpose. This is the id to match in the listener. */ export declare const eventEmit: ({ payload, eventEmittingElement, tagName }: EventEmitProps) => string | undefined; /** * Event Listener * * A optional event listener function matching the 'eventEmit' function. Feature de-anonymizer * on listener callback (de-anonymizing and thereby making inline functions cancelable), * returns a cancel-listener function (practical in useEffects) and * creates and appends a comment node where one can inspect listeners from devtools. * * @param tagName - The name of the ui component emitting the event. * @param listenerCallback - Callback function triggered on reception of emit. * @param options - Takes an object with boolean key of 'once' that auto removes listener after one receieved emit. * @returns function to cancel listener */ export declare const eventListener: (tagName: string, listenerCallback: EventListenerOrEventListenerObject, options?: { once?: boolean; }) => () => void; export {};