about summary refs log tree commit diff
path: root/src/lib/hooks
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/hooks')
-rw-r--r--src/lib/hooks/useTimer.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/hooks/useTimer.ts b/src/lib/hooks/useTimer.ts
index bf3ecc07f..b14a9f24f 100644
--- a/src/lib/hooks/useTimer.ts
+++ b/src/lib/hooks/useTimer.ts
@@ -4,7 +4,7 @@ import * as React from 'react'
  * Helper hook to run persistent timers on views
  */
 export function useTimer(time: number, handler: () => void) {
-  const timer = React.useRef(undefined)
+  const timer = React.useRef<undefined | NodeJS.Timeout>(undefined)
 
   // function to restart the timer
   const reset = React.useCallback(() => {