Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

delegate-it

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

delegate-it - npm Package Compare versions

Comparing version 1.1.0-0 to 1.1.0-1

license

14

index.d.ts

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc