Skip to content

Commit

Permalink
fix(useRetimer): improve timerId typing
Browse files Browse the repository at this point in the history
  • Loading branch information
kyle1an authored Jan 1, 2025
1 parent 9cc5dd8 commit b597636
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/use-retimer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { useCallback, useRef } from 'react';
export function useRetimer() {
const timerIdRef = useRef<number>();

return useCallback((timerId?: number) => {
return useCallback((timerId?: number | ReturnType<typeof setTimeout>) => {
if (typeof timerIdRef.current === 'number') {
clearTimeout(timerIdRef.current);
}
Expand Down

0 comments on commit b597636

Please sign in to comment.