diff --git a/src/use-retimer/index.ts b/src/use-retimer/index.ts index e9bf5476..5963fa9e 100644 --- a/src/use-retimer/index.ts +++ b/src/use-retimer/index.ts @@ -7,7 +7,7 @@ import { useCallback, useRef } from 'react'; export function useRetimer() { const timerIdRef = useRef(); - return useCallback((timerId?: number) => { + return useCallback((timerId?: number | ReturnType) => { if (typeof timerIdRef.current === 'number') { clearTimeout(timerIdRef.current); }