Skip to content

Commit

Permalink
use correct type for the handler ref
Browse files Browse the repository at this point in the history
  • Loading branch information
silltho authored and kettanaito committed Oct 5, 2019
1 parent 2745dde commit 54d57b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hooks/useViewportChange.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const useViewportChange = (
callback: () => void,
throttleInterval: number = 70,
) => {
const handleWindowResize = useRef<any>()
const handleWindowResize = useRef<(...args: any[]) => any>()

useEffect(() => {
handleWindowResize.current = throttle(callback, throttleInterval)
Expand Down

0 comments on commit 54d57b8

Please sign in to comment.