mirror of
https://github.com/streamich/react-use.git
synced 2026-01-25 14:17:16 +00:00
Fixed ref type definition
This commit is contained in:
parent
698399938d
commit
99cb994d45
@ -4,7 +4,7 @@ export type UseTimeoutFnReturn = [() => boolean | null, () => void, () => void];
|
||||
|
||||
export default function useTimeoutFn(fn: Function, ms: number = 0): UseTimeoutFnReturn {
|
||||
const ready = useRef<boolean | null>(false);
|
||||
const timeout = useRef(0);
|
||||
const timeout = useRef<ReturnType<typeof setTimeout>>();
|
||||
|
||||
const isReady = useCallback(() => ready.current, []);
|
||||
const set = useCallback(() => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user