UNPKG

@modern-kit/react

Version:
16 lines (14 loc) 513 B
type RequestFunction<T> = (...args: any[]) => Promise<T>; interface UseAsyncProcessQueueOptions { keepPreviousData?: boolean; } /** * @experimental 실험적인 훅으로 추후 변경될 수 있습니다. */ 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 };