delegate-it
Advanced tools
Comparing version 1.1.0-4 to 1.1.0-5
@@ -5,9 +5,9 @@ export declare type EventType = keyof GlobalEventHandlersEventMap; | ||
}; | ||
export declare type DelegateEventHandler<T extends Event> = (event: DelegateEvent<T>) => any; | ||
export declare type DelegateEventHandler<TElement extends Element, T extends Event> = (event: DelegateEvent<T, TElement>) => any; | ||
export declare type DelegateEvent<T extends Event = Event, E extends Element = Element> = T & { | ||
delegateTarget: E; | ||
}; | ||
declare function delegate<TElement extends Element = Element, TEvent extends Event = Event>(selector: string, type: EventType, callback: DelegateEventHandler<TEvent>, useCapture?: boolean | AddEventListenerOptions): DelegateSubscription; | ||
declare function delegate<TElement extends Element = Element, TEvent extends Event = Event>(elements: EventTarget | Document, selector: string, type: EventType, callback: DelegateEventHandler<TEvent>, useCapture?: boolean | AddEventListenerOptions): DelegateSubscription; | ||
declare function delegate<TElement extends Element = Element, TEvent extends Event = Event>(elements: NodeListOf<Element> | EventTarget[] | string, selector: string, type: EventType, callback: DelegateEventHandler<TEvent>, useCapture?: boolean | AddEventListenerOptions): DelegateSubscription[]; | ||
declare function delegate<TElement extends Element = Element, TEvent extends Event = Event>(selector: string, type: EventType, callback: DelegateEventHandler<TElement, TEvent>, useCapture?: boolean | AddEventListenerOptions): DelegateSubscription; | ||
declare function delegate<TElement extends Element = Element, TEvent extends Event = Event>(elements: EventTarget | Document, selector: string, type: EventType, callback: DelegateEventHandler<TElement, TEvent>, useCapture?: boolean | AddEventListenerOptions): DelegateSubscription; | ||
declare function delegate<TElement extends Element = Element, TEvent extends Event = Event>(elements: NodeListOf<Element> | EventTarget[] | string, selector: string, type: EventType, callback: DelegateEventHandler<TElement, TEvent>, useCapture?: boolean | AddEventListenerOptions): DelegateSubscription[]; | ||
export default delegate; |
{ | ||
"name": "delegate-it", | ||
"description": "Lightweight event delegation", | ||
"version": "1.1.0-4", | ||
"version": "1.1.0-5", | ||
"repository": "bfred-it/delegate-it", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9406