Skip to content

Commit f20944f

Browse files
committed
Merge branch 'master' into useAsync
2 parents ddbcaef + e213f0e commit f20944f

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

typings/index.d.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,13 @@ interface AsyncState<T> {
2626
setError: (error: Error, callback?: () => void) => Error
2727
}
2828

29-
declare class Async<T> extends React.Component<AsyncProps<T>, AsyncState<T>> {
30-
static Pending: React.FunctionComponent<{ children?: AsyncChildren<T>; persist?: boolean }>
31-
static Loading: React.FunctionComponent<{ children?: AsyncChildren<T>; initial?: boolean }>
32-
static Resolved: React.FunctionComponent<{ children?: AsyncChildren<T>; persist?: boolean }>
33-
static Rejected: React.FunctionComponent<{ children?: AsyncChildren<T>; persist?: boolean }>
29+
declare class Async<T> extends React.Component<AsyncProps<T>, AsyncState<T>> {}
30+
31+
namespace Async {
32+
export const Pending: React.FunctionComponent<{ children?: AsyncChildren<T>; persist?: boolean }>
33+
export const Loading: React.FunctionComponent<{ children?: AsyncChildren<T>; initial?: boolean }>
34+
export const Resolved: React.FunctionComponent<{ children?: AsyncChildren<T>; persist?: boolean }>
35+
export const Rejected: React.FunctionComponent<{ children?: AsyncChildren<T>; persist?: boolean }>
3436
}
3537

3638
declare function createInstance<T>(defaultProps?: AsyncProps<T>): Async<T>

0 commit comments

Comments
 (0)