2026-09-11 19:12:58 +00:00
|
|
|
// Module ID: 7518
|
|
|
|
|
// Function ID: 7519
|
2026-07-20 16:05:17 +00:00
|
|
|
// Name: useInterval
|
2026-07-29 08:29:29 +00:00
|
|
|
// Dependencies: [19, 38, 2]
|
2026-07-20 16:05:17 +00:00
|
|
|
// Exports: default
|
|
|
|
|
|
2026-09-11 19:12:58 +00:00
|
|
|
// Module 7518 (useInterval)
|
2026-09-10 05:38:07 +00:00
|
|
|
import noop from "module_19" /* 19 */;
|
|
|
|
|
import size from "module_2" /* 2 */;
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-09-10 05:38:07 +00:00
|
|
|
({ useEffect: c2, useRef: c3 } = noop);
|
|
|
|
|
const result = size.fileFinishedImporting("hooks/useInterval.tsx");
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-09-10 05:38:07 +00:00
|
|
|
export default function useInterval(current, arg1) {
|
2026-08-24 06:08:38 +00:00
|
|
|
closure_1 = arg1;
|
2026-09-10 05:38:07 +00:00
|
|
|
closure_2 = ref(current);
|
|
|
|
|
ref = ref(null);
|
|
|
|
|
const items = [current];
|
|
|
|
|
closure_2(() => {
|
|
|
|
|
closure_2.current = current;
|
2026-07-20 16:05:17 +00:00
|
|
|
}, items);
|
|
|
|
|
const items1 = [arg1];
|
2026-09-10 05:38:07 +00:00
|
|
|
closure_2(() => {
|
2026-07-23 10:11:24 +00:00
|
|
|
if (null !== closure_1) {
|
2026-07-20 16:05:17 +00:00
|
|
|
const _setInterval = setInterval;
|
|
|
|
|
ref.current = setInterval(() => {
|
2026-09-10 05:38:07 +00:00
|
|
|
closure_0(closure_1[1])(null != ref.current, "Missing callback");
|
2026-07-29 08:29:29 +00:00
|
|
|
ref.current();
|
|
|
|
|
}, tmp);
|
|
|
|
|
return () => clearInterval(ref2.current);
|
2026-07-20 16:05:17 +00:00
|
|
|
} else if (null !== ref.current) {
|
|
|
|
|
const _clearInterval = clearInterval;
|
2026-07-29 08:29:29 +00:00
|
|
|
clearInterval(tmp2.current);
|
|
|
|
|
tmp2.current = null;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
}, items1);
|
|
|
|
|
};
|