import { type CleanupFn, type NonNullRef } from './react-ref.js'; import type { Maybe } from './utils.js'; /** * A {@link NonNullRef} with an associated {@link CleanupFn cleanup function} that has been stored after assigning to * it, or `null` if it has not been assigned yet. */ export type StoredRef = { ref: NonNullRef; cleanup: CleanupFn | null; }; /** * @param storedRef Ref to assign the value to. * @param value Value to assign to the ref. * * **WARNING:** This function mutates the ref for performance reasons. */ export declare function assignToStoredRef(storedRef: StoredRef, value: T): void; /** * @param storedRef Ref to cleanup. * * **WARNING:** This function mutates the ref for performance reasons. */ export declare function cleanupStoredRef(storedRef: StoredRef): void; /** * @see StoredRef * * @param ref Original React ref to store. * @param maybeValue Optional initial value to store on the ref. * @returns A {@link StoredRef}. */ export declare function makeStoredRef(ref: NonNullRef, maybeValue: Maybe): StoredRef; //# sourceMappingURL=stored-ref.d.ts.map