From 77e48be4dce3c501359d703137065dbd14435753 Mon Sep 17 00:00:00 2001 From: Lawrence Forooghian Date: Thu, 3 Aug 2023 05:43:43 -0300 Subject: [PATCH] Move storage of supportedTransports out of ConnectionManager class This allows this class to be tree-shaken. --- src/common/lib/transport/connectionmanager.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/common/lib/transport/connectionmanager.ts b/src/common/lib/transport/connectionmanager.ts index 92c87d1a0c..f149f32662 100644 --- a/src/common/lib/transport/connectionmanager.ts +++ b/src/common/lib/transport/connectionmanager.ts @@ -99,6 +99,8 @@ function decodeRecoveryKey(recoveryKey: string): RecoveryContext | null { } } +const supportedTransports: Record = {}; + export class TransportParams { options: ClientOptions; host: string | null; @@ -402,7 +404,9 @@ class ConnectionManager extends EventEmitter { * transport management *********************/ - static supportedTransports: Record = {}; + static get supportedTransports() { + return supportedTransports; + } static initTransports() { WebSocketTransport(ConnectionManager);