mirror of
https://github.com/streamich/react-use.git
synced 2026-01-18 14:06:52 +00:00
8 lines
202 B
TypeScript
8 lines
202 B
TypeScript
export interface AsyncState<T> {
|
|
loading: boolean;
|
|
error?: Error | any;
|
|
value?: T;
|
|
}
|
|
declare const useAsync: <T>(fn: () => Promise<T>, args?: any) => AsyncState<T>;
|
|
export default useAsync;
|