decord/alpha/source/modules/conversations/useConversationBackoffRef.tsx

33 lines
993 B
TypeScript
Raw Normal View History

2026-10-09 10:00:15 +00:00
// Module ID: 9309
// Function ID: 9310
2026-07-20 16:05:17 +00:00
// Name: useConversationBackoffRef
2026-10-09 10:00:15 +00:00
// Dependencies: [19, 7309, 569, 2]
2026-07-20 16:05:17 +00:00
// Exports: useConversationBackoffRef
2026-10-09 10:00:15 +00:00
// Module 9309 (useConversationBackoffRef)
2026-10-03 08:58:59 +00:00
import BackoffDefault from "Backoff" /* 569 */;
import react from "react" /* 19 */;
2026-10-09 10:00:15 +00:00
import ConversationConstants from "ConversationConstants" /* 7309 */;
2026-10-03 08:58:59 +00:00
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
2026-10-03 08:58:59 +00:00
let c3;
let closure_4;
({ FETCH_BACKOFF_MAX_MS: c3, FETCH_BACKOFF_MIN_MS: closure_4 } = ConversationConstants);
const result = size.fileFinishedImporting("modules/conversations/useConversationBackoffRef.tsx");
2026-07-20 16:05:17 +00:00
export const useConversationBackoffRef = function useConversationBackoffRef(items) {
if (items === undefined) {
items = [];
}
2026-10-03 08:58:59 +00:00
const useRef = react.useRef;
const tmp = new BackoffDefault(React3, _false);
const ref = useRef(tmp);
const effect = react.useEffect(() => {
const current = ref.current;
2026-07-23 10:11:24 +00:00
return () => {
current.succeed();
};
2026-07-20 16:05:17 +00:00
}, items);
return ref;
};