mirror of
https://github.com/streamich/react-use.git
synced 2026-01-25 14:17:16 +00:00
Merge pull request #191 from xiaoxiangmoe/master
fix: add optional attributes in AsyncState
This commit is contained in:
commit
2bde034876
@ -3,10 +3,13 @@ import { useState, useEffect, useCallback, DependencyList } from 'react';
|
||||
export type AsyncState<T> =
|
||||
| {
|
||||
loading: true;
|
||||
error?: undefined;
|
||||
value?: undefined;
|
||||
}
|
||||
| {
|
||||
loading: false;
|
||||
error: Error;
|
||||
value?: undefined;
|
||||
}
|
||||
| {
|
||||
loading: false;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user