Skip to content

Commit 8fb800c

Browse files
committed
chore: better typings
1 parent dbbcf20 commit 8fb800c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/pluggableWidgets/events-web/src/hooks/useOnLoadTimer.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ interface UseOnLoadTimerProps {
1111
}
1212

1313
class TimerExecutor {
14-
private intervalHandle: number | undefined;
14+
private intervalHandle: ReturnType<typeof setTimeout> | undefined;
1515
private isFirstTime: boolean = true;
1616
private isPendingExecution: boolean = false;
1717
private canExecute: boolean = false;
@@ -53,7 +53,7 @@ class TimerExecutor {
5353
}
5454

5555
// schedule a timer
56-
this.intervalHandle = window.setTimeout(
56+
this.intervalHandle = setTimeout(
5757
() => {
5858
this.isPendingExecution = true;
5959
this.trigger();
@@ -72,7 +72,7 @@ class TimerExecutor {
7272
}
7373

7474
stop(): void {
75-
window.clearTimeout(this.intervalHandle);
75+
clearTimeout(this.intervalHandle);
7676
this.intervalHandle = undefined;
7777
this.delay = undefined;
7878
this.interval = undefined;

0 commit comments

Comments
 (0)