@@ -61,7 +61,7 @@ export default abstract class HTTPPollingDatafileManager implements DatafileMana
61
61
62
62
private readonly updateInterval : number
63
63
64
- private cancelTimeout ? : ( ) => void
64
+ private cancelTimeout : ( ( ) => void ) | null
65
65
66
66
private isStarted : boolean
67
67
@@ -71,7 +71,7 @@ export default abstract class HTTPPollingDatafileManager implements DatafileMana
71
71
72
72
private timeoutFactory : TimeoutFactory
73
73
74
- private currentRequest ? : AbortableRequest
74
+ private currentRequest : AbortableRequest | null
75
75
76
76
private backoffController : BackoffController
77
77
@@ -123,6 +123,8 @@ export default abstract class HTTPPollingDatafileManager implements DatafileMana
123
123
logger . warn ( 'Invalid updateInterval %s, defaulting to %s' , updateInterval , DEFAULT_UPDATE_INTERVAL )
124
124
this . updateInterval = DEFAULT_UPDATE_INTERVAL
125
125
}
126
+ this . cancelTimeout = null
127
+ this . currentRequest = null
126
128
this . backoffController = new BackoffController ( )
127
129
this . syncOnCurrentRequestComplete = false
128
130
}
@@ -145,14 +147,14 @@ export default abstract class HTTPPollingDatafileManager implements DatafileMana
145
147
this . isStarted = false
146
148
if ( this . cancelTimeout ) {
147
149
this . cancelTimeout ( )
148
- this . cancelTimeout = undefined
150
+ this . cancelTimeout = null
149
151
}
150
152
151
153
this . emitter . removeAllListeners ( )
152
154
153
155
if ( this . currentRequest ) {
154
156
this . currentRequest . abort ( )
155
- this . currentRequest = undefined
157
+ this . currentRequest = null
156
158
}
157
159
158
160
return Promise . resolve ( )
@@ -216,7 +218,7 @@ export default abstract class HTTPPollingDatafileManager implements DatafileMana
216
218
return
217
219
}
218
220
219
- this . currentRequest = undefined
221
+ this . currentRequest = null
220
222
221
223
if ( ! this . isReadyPromiseSettled && ! this . autoUpdate ) {
222
224
// We will never resolve ready, so reject it
0 commit comments