delegate-it
Advanced tools
Comparing version 1.1.0-0 to 1.1.0-1
@@ -1,8 +0,12 @@ | ||
declare type EventType = keyof GlobalEventHandlersEventMap; | ||
declare type DelegateSubscription = { | ||
export declare type EventType = keyof GlobalEventHandlersEventMap; | ||
export declare type DelegateSubscription = { | ||
destroy: VoidFunction; | ||
}; | ||
declare function delegate<TEvent extends Event = Event>(selector: string, type: EventType, callback: EventListener, useCapture?: boolean | AddEventListenerOptions): DelegateSubscription; | ||
declare function delegate<TEvent extends Event = Event>(elements: EventTarget, selector: string, type: EventType, callback: EventListener, useCapture?: boolean | AddEventListenerOptions): DelegateSubscription; | ||
declare function delegate<TEvent extends Event = Event>(elements: NodeListOf<Element> | EventTarget[] | string, selector: string, type: EventType, callback: EventListener, useCapture?: boolean | AddEventListenerOptions): DelegateSubscription[]; | ||
export declare type DelegateEventHandler<T extends Event> = (event: DelegateEvent<T>) => any; | ||
export declare type DelegateEvent<T extends Event = Event> = T & { | ||
delegateTarget: EventTarget; | ||
}; | ||
declare function delegate<TEvent extends Event = Event>(selector: string, type: EventType, callback: DelegateEventHandler<TEvent>, useCapture?: boolean | AddEventListenerOptions): DelegateSubscription; | ||
declare function delegate<TEvent extends Event = Event>(elements: EventTarget | Document, selector: string, type: EventType, callback: DelegateEventHandler<TEvent>, useCapture?: boolean | AddEventListenerOptions): DelegateSubscription; | ||
declare function delegate<TEvent extends Event = Event>(elements: NodeListOf<Element> | EventTarget[] | string, selector: string, type: EventType, callback: DelegateEventHandler<TEvent>, useCapture?: boolean | AddEventListenerOptions): DelegateSubscription[]; | ||
export default delegate; |
{ | ||
"name": "delegate-it", | ||
"description": "Lightweight event delegation", | ||
"version": "1.1.0-0", | ||
"version": "1.1.0-1", | ||
"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
9213
93