Skip to content

Commit

Permalink
Move remaining static properties from BaseRealtime to DefaultRealtime
Browse files Browse the repository at this point in the history
These properties are only used by the tests and are not part of the
public API. Let’s move them out of BaseRealtime to make it more
tree-shakable.
  • Loading branch information
lawrence-forooghian committed Aug 3, 2023
1 parent eea80c9 commit 06d6c66
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/common/lib/client/baserealtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import ProtocolMessage from '../types/protocolmessage';
import { ChannelOptions } from '../../types/channel';
import ClientOptions from '../../types/ClientOptions';
import * as API from '../../../../ably';
import ConnectionManager from '../transport/connectionmanager';
import { ModulesMap } from './modulesmap';

class BaseRealtime extends BaseRest {
Expand Down Expand Up @@ -37,10 +36,6 @@ class BaseRealtime extends BaseRest {
Logger.logAction(Logger.LOG_MINOR, 'Realtime.close()', '');
this.connection.close();
}

static Utils = Utils;
static ConnectionManager = ConnectionManager;
static ProtocolMessage = ProtocolMessage;
}

class Channels extends EventEmitter {
Expand Down
7 changes: 7 additions & 0 deletions src/common/lib/client/defaultrealtime.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
import BaseRealtime from './baserealtime';
import ClientOptions from '../../types/ClientOptions';
import { allCommonModules } from './modulesmap';
import * as Utils from '../util/utils';
import ConnectionManager from '../transport/connectionmanager';
import ProtocolMessage from '../types/protocolmessage';

export class DefaultRealtime extends BaseRealtime {
constructor(options: ClientOptions) {
super(options, allCommonModules);
}

static Utils = Utils;
static ConnectionManager = ConnectionManager;
static ProtocolMessage = ProtocolMessage;
}

0 comments on commit 06d6c66

Please sign in to comment.