Comparing version 5.1.2 to 5.1.3
@@ -5,2 +5,4 @@ export type EventHandler = ((arg1: any, arg2: any, arg3: any, arg4: any) => void) | ((arg1: any, arg2: any, arg3: any) => void) | ((arg1: any, arg2: any) => void) | ((arg1: any) => void) | ((...args: any[]) => void); | ||
once<TEvent extends keyof TEvents>(event: TEvent, callback: TEvents[TEvent]): this; | ||
prependListener<TEvent extends keyof TEvents>(event: TEvent, callback: TEvents[TEvent]): this; | ||
prependOnceListener<TEvent extends keyof TEvents>(event: TEvent, callback: TEvents[TEvent]): this; | ||
removeListener<TEvent extends keyof TEvents>(event: TEvent, callback: TEvents[TEvent]): this; | ||
@@ -10,4 +12,10 @@ off<TEvent extends keyof TEvents>(event: TEvent, callback: TEvents[TEvent]): this; | ||
emit<TEvent extends keyof TEvents>(event: TEvent, ...args: Parameters<TEvents[TEvent]>): boolean; | ||
setMaxListeners(n: number): this; | ||
getMaxListeners(): number; | ||
listeners<TEvent extends keyof TEvents>(eventName: TEvent): TEvents[TEvent][]; | ||
rawListeners<TEvent extends keyof TEvents>(eventName: TEvent): TEvents[TEvent][]; | ||
listenerCount<TEvent extends keyof TEvents>(event: TEvent, listener?: TEvents[TEvent]): number; | ||
eventNames(): Array<keyof TEvents>; | ||
} | ||
export declare class TypedEventEmitter<TEvents extends Record<keyof TEvents, EventHandler>> { | ||
} |
{ | ||
"name": "mqtt", | ||
"description": "A library for the MQTT protocol", | ||
"version": "5.1.2", | ||
"version": "5.1.3", | ||
"contributors": [ | ||
@@ -6,0 +6,0 @@ "Adam Rudd <adamvrr@gmail.com>", |
@@ -23,2 +23,11 @@ import EventEmitter from 'events' | ||
): this | ||
prependListener<TEvent extends keyof TEvents>( | ||
event: TEvent, | ||
callback: TEvents[TEvent], | ||
): this | ||
prependOnceListener<TEvent extends keyof TEvents>( | ||
event: TEvent, | ||
callback: TEvents[TEvent], | ||
): this | ||
removeListener<TEvent extends keyof TEvents>( | ||
@@ -32,2 +41,3 @@ event: TEvent, | ||
): this | ||
removeAllListeners(event?: keyof TEvents): this | ||
@@ -39,2 +49,18 @@ | ||
): boolean | ||
setMaxListeners(n: number): this | ||
getMaxListeners(): number | ||
listeners<TEvent extends keyof TEvents>( | ||
eventName: TEvent, | ||
): TEvents[TEvent][] | ||
rawListeners<TEvent extends keyof TEvents>( | ||
eventName: TEvent, | ||
): TEvents[TEvent][] | ||
listenerCount<TEvent extends keyof TEvents>( | ||
event: TEvent, | ||
listener?: TEvents[TEvent], | ||
): number | ||
eventNames(): Array<keyof TEvents> | ||
} | ||
@@ -41,0 +67,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
1474400
31957