Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align OnConnectCallback with specs expecting Connack packet #1333

Merged
merged 2 commits into from
Oct 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -80,13 +80,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",
Expand Down
4 changes: 2 additions & 2 deletions types/lib/client.d.ts
Expand Up @@ -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 {
/**
Expand Down Expand Up @@ -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
Expand Down