We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 77e267b commit f2e26a0Copy full SHA for f2e26a0
src/useDebouncedCallback.ts
@@ -10,7 +10,7 @@ import useTimeout from './useTimeout'
10
*/
11
export default function useDebouncedCallback<
12
TCallback extends (...args: any[]) => any
13
->(fn: TCallback, delay: number): TCallback {
+>(fn: TCallback, delay: number): (...args: Parameters<TCallback>) => void {
14
const timeout = useTimeout()
15
return useCallback(
16
(...args: any[]) => {
@@ -19,5 +19,5 @@ export default function useDebouncedCallback<
19
}, delay)
20
},
21
[fn, delay],
22
- ) as any
+ )
23
}
0 commit comments