export declare type AsyncState = { loading: true; error?: undefined; value?: undefined; } | { loading: false; error: Error; value?: undefined; } | { loading: false; error?: undefined; value: T; }; declare const useAsync: (fn: () => Promise, args?: any) => AsyncState; export default useAsync;