UNPKG

@modern-kit/react

Version:
13 lines (11 loc) 430 B
type RequestFunction<T> = (...args: any[]) => Promise<T>; interface UseAsyncProcessQueueOptions { keepPreviousData?: boolean; } declare function useAsyncProcessQueue<T = unknown, E = unknown>({ keepPreviousData, }?: UseAsyncProcessQueueOptions): { data: T | null; error: E | null; isLoading: boolean; addToProcessQueue: (callbackFunc: RequestFunction<T>) => Promise<void>; }; export { useAsyncProcessQueue };