Dashboard sipadu mbip
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

useInterval.d.ts 636B

12345678910111213141516
  1. /**
  2. * Creates a `setInterval` that is properly cleaned up when a component unmounted
  3. *
  4. * @param fn an function run on each interval
  5. * @param ms The milliseconds duration of the interval
  6. */
  7. declare function useInterval(fn: () => void, ms: number): void;
  8. /**
  9. * Creates a pasuable `setInterval` that is properly cleaned up when a component unmounted
  10. *
  11. * @param fn an function run on each interval
  12. * @param ms The milliseconds duration of the interval
  13. * @param paused Whether or not the interval is currently running
  14. */
  15. declare function useInterval(fn: () => void, ms: number, paused: boolean): void;
  16. export default useInterval;