Update from Vibe Studio

This commit is contained in:
Vibe Studio
2026-01-09 14:52:46 +00:00
parent 42a0efe70b
commit 47fa6d98b2
28661 changed files with 2421771 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
declare const useRefFunction: <T extends (...args: any) => any>(reFunction: T) => (...rest: Parameters<T>) => ReturnType<T>;
export { useRefFunction };

View File

@@ -0,0 +1,14 @@
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
import { useCallback, useRef } from 'react';
var useRefFunction = function useRefFunction(reFunction) {
var ref = useRef(null);
ref.current = reFunction;
return useCallback(function () {
var _ref$current;
for (var _len = arguments.length, rest = new Array(_len), _key = 0; _key < _len; _key++) {
rest[_key] = arguments[_key];
}
return (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.call.apply(_ref$current, [ref].concat(_toConsumableArray(rest)));
}, []);
};
export { useRefFunction };