/** * @license * Copyright 2023 Aglyn LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { type ForwardedRef, type MutableRefObject, type RefCallback } from 'react'; /** * Check if value is of type function similar to a ref callback */ export declare function isRefCallback(val: ForwardedRef): val is RefCallback; /** * Check if value is of mutable ref object */ export declare function isRefObject(val: ForwardedRef): val is MutableRefObject; /** * Assign a React ref object, could be a RefCallback or RefObject */ export declare function assignRef(ref: ForwardedRef, value: T): T; /** * Merges multiple refs into one. Works with either callback or object refs. */ export declare function mergeRefs(...refs: ForwardedRef[]): RefCallback; /** * Merges multiple refs into one, by returning a new memoized ref callback */ export declare function useMergeRefs(...refs: ForwardedRef[]): RefCallback; export default useMergeRefs;