mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-10 09:07:45 +01:00
Fixed type errors.
This commit is contained in:
parent
98b36380b5
commit
20a09d3d27
1 changed files with 5 additions and 5 deletions
|
@ -9,7 +9,7 @@ class SkipNotice {
|
||||||
manualSkip: boolean;
|
manualSkip: boolean;
|
||||||
maxCountdownTime: () => number;
|
maxCountdownTime: () => number;
|
||||||
countdownTime: any;
|
countdownTime: any;
|
||||||
countdownInterval: number;
|
countdownInterval: NodeJS.Timeout;
|
||||||
unskipCallback: any;
|
unskipCallback: any;
|
||||||
idSuffix: any;
|
idSuffix: any;
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ class SkipNotice {
|
||||||
//the countdown until this notice closes
|
//the countdown until this notice closes
|
||||||
this.countdownTime = this.maxCountdownTime();
|
this.countdownTime = this.maxCountdownTime();
|
||||||
//the id for the setInterval running the countdown
|
//the id for the setInterval running the countdown
|
||||||
this.countdownInterval = -1;
|
this.countdownInterval = null;
|
||||||
|
|
||||||
//the unskip button's callback
|
//the unskip button's callback
|
||||||
this.unskipCallback = this.unskip.bind(this);
|
this.unskipCallback = this.unskip.bind(this);
|
||||||
|
@ -220,7 +220,7 @@ class SkipNotice {
|
||||||
pauseCountdown() {
|
pauseCountdown() {
|
||||||
//remove setInterval
|
//remove setInterval
|
||||||
clearInterval(this.countdownInterval);
|
clearInterval(this.countdownInterval);
|
||||||
this.countdownInterval = -1;
|
this.countdownInterval = null;
|
||||||
|
|
||||||
//reset countdown
|
//reset countdown
|
||||||
this.countdownTime = this.maxCountdownTime();
|
this.countdownTime = this.maxCountdownTime();
|
||||||
|
@ -237,7 +237,7 @@ class SkipNotice {
|
||||||
|
|
||||||
startCountdown() {
|
startCountdown() {
|
||||||
//if it has already started, don't start it again
|
//if it has already started, don't start it again
|
||||||
if (this.countdownInterval != -1) return;
|
if (this.countdownInterval !== null) return;
|
||||||
|
|
||||||
this.countdownInterval = setInterval(this.countdown.bind(this), 1000);
|
this.countdownInterval = setInterval(this.countdown.bind(this), 1000);
|
||||||
|
|
||||||
|
@ -425,7 +425,7 @@ class SkipNotice {
|
||||||
}
|
}
|
||||||
|
|
||||||
//remove setInterval
|
//remove setInterval
|
||||||
if (this.countdownInterval != -1) clearInterval(this.countdownInterval);
|
if (this.countdownInterval !== null) clearInterval(this.countdownInterval);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue