eventemitter3
Advanced tools
Comparing version 4.0.2 to 4.0.3
@@ -42,3 +42,3 @@ /** | ||
event: T, | ||
fn: EventEmitter.EventListener<EventTypes, T> | ((...args: any[]) => void), | ||
fn: EventEmitter.EventListener<EventTypes, T>, | ||
context?: Context | ||
@@ -57,3 +57,3 @@ ): this; | ||
event: T, | ||
fn: EventEmitter.EventListener<EventTypes, T> | ((...args: any[]) => void), | ||
fn: EventEmitter.EventListener<EventTypes, T>, | ||
context?: Context | ||
@@ -67,3 +67,3 @@ ): this; | ||
event: T, | ||
fn?: EventEmitter.EventListener<EventTypes, T> | ((...args: any[]) => void), | ||
fn?: EventEmitter.EventListener<EventTypes, T>, | ||
context?: Context, | ||
@@ -74,3 +74,3 @@ once?: boolean | ||
event: T, | ||
fn?: EventEmitter.EventListener<EventTypes, T> | ((...args: any[]) => void), | ||
fn?: EventEmitter.EventListener<EventTypes, T>, | ||
context?: Context, | ||
@@ -108,2 +108,10 @@ once?: boolean | ||
export type ArgumentMap<T> = { | ||
[K in keyof T]: T[K] extends (...args: any[]) => void | ||
? Parameters<T[K]> | ||
: T[K] extends any[] | ||
? T[K] | ||
: any[]; | ||
}; | ||
export type EventListener< | ||
@@ -114,7 +122,3 @@ T extends ValidEventTypes, | ||
? (...args: any[]) => void | ||
: T[K] extends (...args: any[]) => void | ||
? T[K] | ||
: T[K] extends any[] | ||
? (...args: T[K]) => void | ||
: (...args: any[]) => void; | ||
: (...args: ArgumentMap<T>[K]) => void; | ||
@@ -121,0 +125,0 @@ export type EventArgs< |
{ | ||
"name": "eventemitter3", | ||
"version": "4.0.2", | ||
"version": "4.0.3", | ||
"description": "EventEmitter3 focuses on performance while maintaining a Node.js AND browser compatible interface.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
692
37763