Skip to content

Commit

Permalink
fix(types): ClientId type definition (#741)
Browse files Browse the repository at this point in the history
  • Loading branch information
seriousme authored May 13, 2022
1 parent f82b8f8 commit f3b4b16
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion types/packet.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { AedesPacket } from 'aedes-packet'
import { IConnackPacket, IConnectPacket, IPingreqPacket, IPublishPacket, IPubrelPacket, ISubscribePacket, ISubscription, IUnsubscribePacket } from 'mqtt-packet'

export type ClientId = string
export type SubscribePacket = ISubscribePacket & { cmd: 'subscribe' }
export type UnsubscribePacket = IUnsubscribePacket & { cmd: 'unsubscribe' }
export type Subscription = ISubscription & { clientId?: string }
export type Subscription = ISubscription & { clientId?: ClientId }
export type Subscriptions = { subscriptions: Subscription[] }

export type PublishPacket = IPublishPacket & { cmd: 'publish' }
Expand Down

0 comments on commit f3b4b16

Please sign in to comment.