fix: type error

This commit is contained in:
email 2022-04-15 09:27:38 +08:00
parent 02b37ef466
commit eae858e20b

View File

@ -16,7 +16,7 @@ export default function useDebounce<T extends (...args: any[]) => any>(func: T,
} }
}, []); }, []);
const run = useCallback((...args) => { const run = useCallback((...args: any) => {
cancel(); cancel();
timer.current = window.setTimeout(() => { timer.current = window.setTimeout(() => {
func(...args); func(...args);