File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -51,9 +51,11 @@ export interface WebSocketLikeConstructor {
51
51
address : string | URL ,
52
52
_ignored ?: any ,
53
53
options ?: { headers : Object | undefined }
54
- ) : WebSocket
54
+ ) : WebSocketLike
55
55
}
56
56
57
+ export type WebSocketLike = WebSocket
58
+
57
59
export interface WebSocketLikeError {
58
60
error : any
59
61
message : string
@@ -107,7 +109,7 @@ export default class RealtimeClient {
107
109
encode : Function
108
110
decode : Function
109
111
reconnectAfterMs : Function
110
- conn : WebSocket | null = null
112
+ conn : WebSocketLike | null = null
111
113
sendBuffer : Function [ ] = [ ]
112
114
serializer : Serializer = new Serializer ( )
113
115
stateChangeCallbacks : {
@@ -213,7 +215,7 @@ export default class RealtimeClient {
213
215
214
216
this . conn = new this . transport ( this . endpointURL ( ) , undefined , {
215
217
headers : this . headers ,
216
- } ) as WebSocket
218
+ } ) as WebSocketLike
217
219
this . setupConnection ( )
218
220
}
219
221
You can’t perform that action at this time.
0 commit comments