Skip to content

Commit

Permalink
fix: add optional attributes in AsyncState
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoxiangmoe committed Mar 29, 2019
1 parent 42bb7c7 commit b0c9770
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/useAsync.ts
Expand Up @@ -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;
Expand Down

0 comments on commit b0c9770

Please sign in to comment.