diff --git a/package.json b/package.json index 0f9261059..712dc0350 100644 --- a/package.json +++ b/package.json @@ -82,13 +82,14 @@ }, "devDependencies": { "@types/node": "^10.0.0", + "@types/ws": "^8.2.0", + "aedes": "^0.42.5", "airtap": "^3.0.0", "browserify": "^16.5.0", "chai": "^4.2.0", "codecov": "^3.0.4", "end-of-stream": "^1.4.1", "global": "^4.3.2", - "aedes": "^0.42.5", "mkdirp": "^0.5.1", "mocha": "^4.1.0", "mqtt-connection": "^4.0.0", diff --git a/types/lib/client.d.ts b/types/lib/client.d.ts index 7821a96d7..c439fe89e 100644 --- a/types/lib/client.d.ts +++ b/types/lib/client.d.ts @@ -8,7 +8,7 @@ import { IClientReconnectOptions } from './client-options' import { Store } from './store' -import { Packet, IConnectPacket, IPublishPacket, IDisconnectPacket, QoS } from 'mqtt-packet' +import { Packet, IConnectPacket, IPublishPacket, IDisconnectPacket, QoS, IConnackPacket } from 'mqtt-packet' export interface ISubscriptionGrant { /** @@ -66,7 +66,7 @@ export interface ISubscriptionMap { } } -export declare type OnConnectCallback = (packet: IConnectPacket) => void +export declare type OnConnectCallback = (packet: IConnackPacket) => void export declare type OnDisconnectCallback = (packet: IDisconnectPacket) => void export declare type ClientSubscribeCallback = (err: Error, granted: ISubscriptionGrant[]) => void export declare type OnMessageCallback = (topic: string, payload: Buffer, packet: IPublishPacket) => void