File tree Expand file tree Collapse file tree 1 file changed +17
-5
lines changed Expand file tree Collapse file tree 1 file changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ interface AsyncOptions<T> {
9
9
watch ?: any
10
10
initialValue ?: T
11
11
onResolve ?: ( data : T ) => void
12
- onError ?: ( error : Error ) => void
12
+ onReject ?: ( error : Error ) => void
13
13
}
14
14
15
15
interface AsyncProps < T > extends AsyncOptions < T > {
@@ -33,10 +33,22 @@ interface AsyncState<T> {
33
33
declare class Async < T > extends React . Component < AsyncProps < T > , AsyncState < T > > { }
34
34
35
35
declare namespace Async {
36
- export function Pending < T > ( props : { children ?: AsyncChildren < T > ; persist ?: boolean } ) : React . ReactNode
37
- export function Loading < T > ( props : { children ?: AsyncChildren < T > ; initial ?: boolean } ) : React . ReactNode
38
- export function Resolved < T > ( props : { children ?: AsyncChildren < T > ; persist ?: boolean } ) : React . ReactNode
39
- export function Rejected < T > ( props : { children ?: AsyncChildren < T > ; persist ?: boolean } ) : React . ReactNode
36
+ export function Pending < T > ( props : {
37
+ children ?: AsyncChildren < T >
38
+ persist ?: boolean
39
+ } ) : React . ReactNode
40
+ export function Loading < T > ( props : {
41
+ children ?: AsyncChildren < T >
42
+ initial ?: boolean
43
+ } ) : React . ReactNode
44
+ export function Resolved < T > ( props : {
45
+ children ?: AsyncChildren < T >
46
+ persist ?: boolean
47
+ } ) : React . ReactNode
48
+ export function Rejected < T > ( props : {
49
+ children ?: AsyncChildren < T >
50
+ persist ?: boolean
51
+ } ) : React . ReactNode
40
52
}
41
53
42
54
declare function createInstance < T > ( defaultProps ?: AsyncProps < T > ) : Async < T >
You can’t perform that action at this time.
0 commit comments