refactor: improve typing in backend (#748)

This commit is contained in:
Carlos Valente
2024-01-30 21:12:19 +01:00
committed by GitHub
parent 39711c1edd
commit 6a5020424b
26 changed files with 703 additions and 147 deletions
@@ -12,7 +12,7 @@ import { state, stateMutations } from '../../state.js';
* Coordinating with necessary services
*/
class RuntimeService {
private eventTimer: TimerService;
private eventTimer: TimerService | null = null;
constructor() {}
@@ -28,8 +28,10 @@ class RuntimeService {
}
shutdown() {
logger.info(LogOrigin.Server, 'Runtime service shutting down');
this.eventTimer.shutdown();
if (this.eventTimer) {
logger.info(LogOrigin.Server, 'Runtime service shutting down');
this.eventTimer.shutdown();
}
}
/**