export type EventType = keyof GlobalEventHandlersEventMap; export interface DelegateSubscription { destroy: VoidFunction; } export interface Setup { selector: string; type: EventType; capture: boolean; } export type DelegateEventHandler = (event: DelegateEvent) => void; export type DelegateEvent = TEvent & { delegateTarget: TElement; }; export declare function delegate(selector: string, type: EventType, callback: DelegateEventHandler, options?: boolean | AddEventListenerOptions): DelegateSubscription; export declare function delegate(elements: EventTarget | Document, selector: string, type: EventType, callback: DelegateEventHandler, options?: boolean | AddEventListenerOptions): DelegateSubscription; export declare function delegate(elements: ArrayLike | string, selector: string, type: EventType, callback: DelegateEventHandler, options?: boolean | AddEventListenerOptions): DelegateSubscription[];