decord/alpha/source/hooks/useForwardedRef.tsx
github-actions 52331fb8ae chore: update source for alpha 349.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5051.js (118.4 MB)
2026-09-30 07:29:52 +00:00

32 lines
736 B
TypeScript

// Module ID: 16092
// Function ID: 16093
// Name: useForwardedRef
// Dependencies: [19, 2]
// Exports: default
// Module 16092 (useForwardedRef)
import noop from "module_19" /* 19 */;
const size = fn(2);
const result = size.fileFinishedImporting("hooks/useForwardedRef.tsx");
export default function useForwardedRef(arg0) {
closure_0 = arg0;
const ref = noop.useRef(null);
const items = [arg0];
const items1 = [
ref,
noop.useCallback((current) => {
let tmp = closure_0;
if (null != closure_0) {
if (typeof tmp === "function") {
tmp = tmp(current);
} else {
tmp.current = current;
}
ref.current = current;
}
}, items)
];
return items1;
};