From 997944380702c17d6b144b499685e591b3178c11 Mon Sep 17 00:00:00 2001 From: Yoseph Maguire Date: Mon, 21 Jun 2021 11:37:20 -0700 Subject: [PATCH] fix: websocket and typescript --- package.json | 2 +- types/lib/client.d.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 678c736b0..f52db0b7f 100644 --- a/package.json +++ b/package.json @@ -74,7 +74,7 @@ "readable-stream": "^3.6.0", "reinterval": "^1.1.0", "split2": "^3.1.0", - "ws": "^7.3.1", + "ws": "^7.5.0", "xtend": "^4.0.2" }, "devDependencies": { diff --git a/types/lib/client.d.ts b/types/lib/client.d.ts index 62416484d..7821a96d7 100644 --- a/types/lib/client.d.ts +++ b/types/lib/client.d.ts @@ -71,9 +71,10 @@ 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 export declare type OnPacketCallback = (packet: Packet) => void +export declare type OnCloseCallback = () => void export declare type OnErrorCallback = (error: Error) => void export declare type PacketCallback = (error?: Error, packet?: Packet) => any -export declare type CloseCallback = () => void +export declare type CloseCallback = (error?: Error) => void export interface IStream extends events.EventEmitter { pipe (to: any): any