/** * Adds an event listener to an element. * @returns A callback to remove the event listener from the element. * * @param target * @param type * @param listener * @param options */ export declare function addListener unknown : Type extends keyof DocumentEventMap ? (this: Document, ev: DocumentEventMap[Type]) => unknown : Type extends keyof HTMLElementEventMap ? (this: HTMLElement, ev: HTMLElementEventMap[Type]) => unknown : Type extends keyof ElementEventMap ? (this: Element, ev: ElementEventMap[Type]) => unknown : EventListenerOrEventListenerObject>(target: TargetInterface | null | undefined, type: Type, listener: Listener, options?: boolean | AddEventListenerOptions): () => void; type AllowedEvent = keyof DocumentEventMap | 'w-close'; /** * Dispatches a custom event that bubbles from the target. * @param target The element where the event will originate. * @param events The event name or an array of event names. * @returns True if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise. */ export declare const simulateEvent: (target: EventTarget, events: AllowedEvent | Array) => boolean; export {};