Skip to content

Commit

Permalink
feat($onError): add onError option for failed async requests (require…
Browse files Browse the repository at this point in the history
…-universal-module does most the
  • Loading branch information
faceyspacey committed Jun 30, 2017
1 parent c2ac903 commit ff097e9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ type AsyncComponent<Props> =
| (() => Promise<Component<Props>>)
type Key<Props> = string | null | ((module: ?Object) => Component<Props>)
type OnLoad = (module: Object) => void
type OnError = (error: Object) => void
type PathResolve = Id | (() => Id)
type Options<Props> = {
loading?: LoadingCompponent,
Expand All @@ -29,7 +30,8 @@ type Options<Props> = {
chunkName?: string,
timeout?: number,
key?: Key<Props>,
onLoad?: OnLoad
onLoad?: OnLoad,
onError?: OnError
}

type Props = {
Expand Down

0 comments on commit ff097e9

Please sign in to comment.