Skip to content

Commit

Permalink
Merge pull request #236 from nealeu/patch-1
Browse files Browse the repository at this point in the history
Export Props interfaces to allow exported declarations
  • Loading branch information
ghengeveld authored Dec 31, 2019
2 parents 1351fd0 + 5ffaab2 commit 69e0019
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
10 changes: 5 additions & 5 deletions packages/react-async/src/Async.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,23 @@ import {
ReducerAsyncState,
} from "./types"

interface InitialProps<T> {
export interface InitialProps<T> {
children?: InitialChildren<T>
persist?: boolean
}
interface PendingProps<T> {
export interface PendingProps<T> {
children?: PendingChildren<T>
initial?: boolean
}
interface FulfilledProps<T> {
export interface FulfilledProps<T> {
children?: FulfilledChildren<T>
persist?: boolean
}
interface RejectedProps<T> {
export interface RejectedProps<T> {
children?: RejectedChildren<T>
persist?: boolean
}
interface SettledProps<T> {
export interface SettledProps<T> {
children?: SettledChildren<T>
persist?: boolean
}
Expand Down
11 changes: 10 additions & 1 deletion packages/react-async/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
import Async from "./Async"
export { default as Async, createInstance } from "./Async"
export {
default as Async,
createInstance,
AsyncConstructor,
FulfilledProps,
InitialProps,
PendingProps,
RejectedProps,
SettledProps,
} from "./Async"
export * from "./types"
export { default as useAsync, useFetch, FetchOptions, FetchError } from "./useAsync"
export default Async
Expand Down

0 comments on commit 69e0019

Please sign in to comment.