Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export Props interfaces to allow exported declarations #236

Merged
merged 2 commits into from
Dec 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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