Skip to content

Commit

Permalink
Move storage of supportedTransports out of ConnectionManager class
Browse files Browse the repository at this point in the history
This allows this class to be tree-shaken.
  • Loading branch information
lawrence-forooghian committed Aug 3, 2023
1 parent 2ac0700 commit 05ca42d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/common/lib/transport/connectionmanager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ function decodeRecoveryKey(recoveryKey: string): RecoveryContext | null {
}
}

const supportedTransports: Record<string, TransportCtor> = {};

export class TransportParams {
options: ClientOptions;
host: string | null;
Expand Down Expand Up @@ -402,7 +404,9 @@ class ConnectionManager extends EventEmitter {
* transport management
*********************/

static supportedTransports: Record<string, TransportCtor> = {};
static get supportedTransports() {
return supportedTransports;
}

static initTransports() {
WebSocketTransport(ConnectionManager);
Expand Down

0 comments on commit 05ca42d

Please sign in to comment.