Skip to content

Commit b2eeb38

Browse files
committed
declaration fixed useInterval and useTimeout
1 parent 906ef2a commit b2eeb38

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/useInterval.ts

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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)