polfan-server-js-client 0.2.61 → 0.2.63

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -29,6 +29,7 @@ export declare class WebSocketChatClient extends AbstractChatClient implements O
29
29
  connect(): Promise<void>;
30
30
  disconnect(): void;
31
31
  send<CommandType extends keyof CommandsMap>(commandType: CommandType, commandData: CommandsMap[CommandType][0]): Promise<CommandResult<CommandsMap[CommandType][1]>>;
32
+ get isReady(): boolean;
32
33
  private sendEnvelope;
33
34
  private onMessage;
34
35
  private onClose;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "polfan-server-js-client",
3
- "version": "0.2.61",
3
+ "version": "0.2.63",
4
4
  "description": "JavaScript client library for handling communication with Polfan chat server.",
5
5
  "author": "Jarosław Żak",
6
6
  "license": "MIT",
@@ -72,6 +72,10 @@ export class WebSocketChatClient extends AbstractChatClient implements Observabl
72
72
  return promise;
73
73
  }
74
74
 
75
+ public get isReady(): boolean {
76
+ return this.isReadyToSendWsState();
77
+ }
78
+
75
79
  private sendEnvelope(envelope: Envelope): void {
76
80
  if (this.isReadyToSendWsState()) {
77
81
  this.ws.send(JSON.stringify(envelope));