import type { AnyFunc } from "../utils/basic.js"; export type UseAsyncLockReturns = (...args: Parameters) => R extends undefined ? Promise> | undefined> : Promise> | Awaited>>; /** * A React Hook to create a function that can be used to ensure that **only one is running at a time**, and provides an additional invalid operation callback function. * * @param {AnyFunc} asyncFn - `AnyFunc`, the async function to run, see {@link AnyFunc} * @param {AnyFunc} [onMeetLock] - `AnyFunc`, the callback function to run when the lock is met, see {@link AnyFunc} * @returns {UseAsyncLockReturns} `UseAsyncLockReturns`, see {@link UseAsyncLockReturns} */ export declare function useAsyncLock(asyncFn: T, onMeetLock?: R): UseAsyncLockReturns;