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
@@ -8,7 +8,7 @@ export type GetTimeFn = () => number;
export class ExtraTimerService {
private timer: SimpleTimer;
private interval: NodeJS.Timer;
private interval: NodeJS.Timer | null = null;
private emit: EmitFn;
private getTime: GetTimeFn;
@@ -23,7 +23,9 @@ export class ExtraTimerService {
}
private stopInterval() {
clearInterval(this.interval);
if (this.interval) {
clearInterval(this.interval);
}
}
@broadcastReturn