decord/alpha/source/hooks/useForwardedRef.tsx
github-actions c6aa9eb120 chore: update source for alpha 349.3
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5030.js (118.4 MB)
2026-10-01 06:55:13 +00:00

32 lines
736 B
TypeScript

// Module ID: 16110
// Function ID: 16111
// Name: useForwardedRef
// Dependencies: [19, 2]
// Exports: default
// Module 16110 (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;
};