From d6749427f05a22ba1df8538fc0a5df808c7d5b5c Mon Sep 17 00:00:00 2001 From: Hans Klunder Date: Thu, 12 May 2022 20:21:58 +0200 Subject: [PATCH] feature: add ClientId type definition --- types/packet.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/types/packet.d.ts b/types/packet.d.ts index aaf81e41..3822d0f0 100644 --- a/types/packet.d.ts +++ b/types/packet.d.ts @@ -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' }