Skip to content

Commit

Permalink
Added missing events according to the docs. moscajs#197
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron Sommardahl committed May 19, 2018
1 parent 5c63708 commit cacfe33
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cacfe33

Please sign in to comment.