File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " jderobot-commsmanager" ,
3- "version" : " 1.0.18 " ,
3+ "version" : " 1.0.19 " ,
44 "main" : " dist/main.js" ,
55 "typings" : " dist/index.d.ts" ,
66 "scripts" : {
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ export default class CommsManager {
1313 private ws : WebSocket ;
1414 private observers : { [ id : string ] : Function [ ] } = { } ;
1515 private pendingPromises : Map < string , PromiseHandlers > = new Map ( ) ;
16- private static timeoutId ?: NodeJS . Timeout ;
16+ private static timeoutId ?: number ;
1717 private static state : string = "idle" ;
1818 private static adress : string = "ws://127.0.0.1:7163" ;
1919 private static universe ?: string ;
@@ -74,7 +74,7 @@ export default class CommsManager {
7474 console . log ( `Connection with ${ CommsManager . adress } interrupted` ) ;
7575 }
7676
77- CommsManager . timeoutId = setTimeout ( function ( ) {
77+ CommsManager . timeoutId = window . setTimeout ( function ( ) {
7878 delete CommsManager . instance ;
7979 CommsManager . instance = new CommsManager ( ) ;
8080 } , 1000 ) ;
@@ -95,7 +95,7 @@ export default class CommsManager {
9595 delete CommsManager . instance ;
9696 CommsManager . instance = undefined ;
9797 if ( CommsManager . timeoutId ) {
98- clearTimeout ( CommsManager . timeoutId ) ;
98+ window . clearTimeout ( CommsManager . timeoutId ) ;
9999 CommsManager . timeoutId = undefined ;
100100 }
101101 }
You can’t perform that action at this time.
0 commit comments