Skip to content

Commit e6097d3

Browse files
committed
Offer named export as alternative to default export.
1 parent 914ee7b commit e6097d3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/react-async/src/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@ export type AsyncRejected<T> = AbstractState<T> & {
114114
}
115115
export type AsyncState<T> = AsyncInitial<T> | AsyncPending<T> | AsyncFulfilled<T> | AsyncRejected<T>
116116

117-
declare class Async<T> extends Component<AsyncProps<T>, AsyncState<T>> {}
117+
export class Async<T> extends Component<AsyncProps<T>, AsyncState<T>> {}
118118

119-
declare namespace Async {
119+
export namespace Async {
120120
export function Initial<T>(props: { children?: AsyncChildren<T>; persist?: boolean }): JSX.Element
121121
export function Pending<T>(props: { children?: AsyncChildren<T>; initial?: boolean }): JSX.Element
122122
export function Loading<T>(props: { children?: AsyncChildren<T>; initial?: boolean }): JSX.Element

packages/react-async/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import Async from "./Async"
2-
export { createInstance } from "./Async"
2+
export { default as Async, createInstance } from "./Async"
33
export { default as useAsync, useFetch } from "./useAsync"
44
export default Async
55
export { statusTypes } from "./status"

0 commit comments

Comments
 (0)