useDelayReset.d.ts 292 B

12345
  1. /**
  2. * Similar with `useLock`, but this hook will always execute last value.
  3. * When set to `true`, it will keep `true` for a short time even if `false` is set.
  4. */
  5. export default function useDelayReset(timeout?: number): [boolean, (val: boolean, callback?: () => void) => void, () => void];