From cacfe33bc79c978622e988264f8a4b2a670ac1dd Mon Sep 17 00:00:00 2001 From: Byron Sommardahl Date: Sat, 19 May 2018 09:27:09 -0500 Subject: [PATCH] Added missing events according to the docs. #197 --- types/index.d.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/types/index.d.ts b/types/index.d.ts index 237ed5f1..112fe82f 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -63,9 +63,11 @@ interface Aedes extends EventEmitter { authorizeForward: AuthorizeForwardCallback published: PublishedCallback - on (event: 'client' | 'clientDisconnect' | 'keepaliveTimeout', cb: (client: Client) => void): this + on (event: 'closed', cb: () => void): this + on (event: 'client' | 'clientDisconnect' | 'keepaliveTimeout' | 'connackSent', cb: (client: Client) => void): this on (event: 'clientError' | 'connectionError', cb: (client: Client, error: Error) => void): this - on (event: 'ping', cb: (packet: any, client: Client) => void): this + on (event: 'ping' | 'publish' | 'ack', cb: (packet: any, client: Client) => void): this + on (event: 'subscribe' | 'unsubscribe', cb: (subscriptions: ISubscription | ISubscription[] | ISubscribePacket, client: Client) => void): this publish (packet: IPublishPacket & { topic: string | Buffer }, done: () => void): void subscribe (topic: string, callback: (packet: ISubscribePacket, cb: () => void) => void, done: () => void): void