File tree 2 files changed +8
-3
lines changed
src/api/resources/empathicVoice/resources/chat/client
2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " hume" ,
3
- "version" : " 0.9.1 " ,
3
+ "version" : " 0.9.2 " ,
4
4
"private" : false ,
5
5
"repository" : " https://github.com/HumeAI/hume-typescript-sdk" ,
6
6
"main" : " ./index.js" ,
Original file line number Diff line number Diff line change @@ -20,20 +20,25 @@ export declare namespace ChatSocket {
20
20
21
21
export class ChatSocket {
22
22
public readonly socket : core . ReconnectingWebSocket ;
23
- public readonly readyState : number ;
24
23
25
24
protected readonly eventHandlers : ChatSocket . EventHandlers = { } ;
26
25
27
26
constructor ( { socket } : ChatSocket . Args ) {
28
27
this . socket = socket ;
29
- this . readyState = socket . readyState ;
30
28
31
29
this . socket . addEventListener ( "open" , this . handleOpen ) ;
32
30
this . socket . addEventListener ( "message" , this . handleMessage ) ;
33
31
this . socket . addEventListener ( "close" , this . handleClose ) ;
34
32
this . socket . addEventListener ( "error" , this . handleError ) ;
35
33
}
36
34
35
+ /**
36
+ * The current state of the connection; this is one of the Ready state constants
37
+ */
38
+ get readyState ( ) : number {
39
+ return this . socket . readyState ;
40
+ }
41
+
37
42
/**
38
43
* @param event - The event to attach to.
39
44
* @param callback - The callback to run when the event is triggered.
You can’t perform that action at this time.
0 commit comments