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

IPublishPacket types is wrong definition? #73

Open
wh1tecat-nya opened this issue Feb 4, 2020 · 0 comments
Open

IPublishPacket types is wrong definition? #73

wh1tecat-nya opened this issue Feb 4, 2020 · 0 comments

Comments

@wh1tecat-nya
Copy link

In here, IPublishPacket description is this.

Only the topic property is mandatory.

But in /types/index.d.ts, IPublishPacket definition is this.

export interface IPublishPacket extends IPacket {
cmd: 'publish'
qos: QoS
dup: boolean
retain: boolean
topic: string
payload: string | Buffer
properties?: {
payloadFormatIndicator?: boolean,
messageExpiryInterval?: number,
topicAlias?: number,
responseTopic?: string,
correlationData?: Buffer,
userProperties?: Object,
subscriptionIdentifier?: number,
contentType?: string
}
}

I think so key of qos, dup, retain, payload (and cmd) is need change to optional.

If this is correct, I can send PR.
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant