Skip to content

Commit cadce30

Browse files
committed
fix(#402): declaration fixed useInterval and useTimeout.
Closes #402
2 parents 906ef2a + b2eeb38 commit cadce30

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/useInterval.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const useInterval = <TCallback extends GenericFunction>
5656
}
5757
}, [])
5858

59-
return [isCleared, clear]
59+
return [isCleared, clear] as [boolean, () => void]
6060
}
6161

6262
export default useInterval

src/useTimeout.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const useTimeout = <TCallback extends GenericFunction>
5454
}
5555
}, [])
5656

57-
return [isCleared, clear]
57+
return [isCleared, clear] as [boolean, () => void]
5858
}
5959

6060
export default useTimeout

0 commit comments

Comments
 (0)