import type { ParseSelector } from 'typed-query-selector/parser.d.js'; export type DelegateOptions = AddEventListenerOptions & { base?: EventTarget; }; export type EventType = keyof GlobalEventHandlersEventMap; export type DelegateEventHandler = (event: DelegateEvent) => void; export type DelegateEvent = TEvent & { delegateTarget: TElement; }; /** * Delegates event to a selector. * @param options A boolean value setting options.capture or an options object of type AddEventListenerOptions */ declare function delegate, TEventType extends EventType = EventType>(selector: Selector | readonly Selector[], type: TEventType | readonly TEventType[], callback: DelegateEventHandler, options?: DelegateOptions): void; declare function delegate(selector: string | readonly string[], type: TEventType | readonly TEventType[], callback: DelegateEventHandler, options?: DelegateOptions): void; export default delegate;