[react-loadable]: update types for v5.4

This commit is contained in:
VincentBel
2018-05-15 16:47:53 +08:00
parent d11cc3b1a2
commit 138ea7344c
2 changed files with 3 additions and 1 deletions

View File

@@ -1,4 +1,4 @@
// Type definitions for react-loadable 5.3
// Type definitions for react-loadable 5.4
// Project: https://github.com/thejameskyle/react-loadable#readme
// Definitions by: Diogo Franco <https://github.com/Kovensky>
// Oden S. <https://github.com/odensc>
@@ -16,6 +16,7 @@ declare namespace LoadableExport {
pastDelay: boolean;
timedOut: boolean;
error: any;
retry: () => void;
}
type Options<Props, Exports extends object> = OptionsWithoutRender<Props> | OptionsWithRender<Props, Exports>;

View File

@@ -9,6 +9,7 @@ class LoadingComponent extends React.Component<Loadable.LoadingComponentProps> {
{this.props.isLoading}
{this.props.pastDelay}
{this.props.timedOut}
<button onClick={this.props.retry}>Retry</button>
</div>
);
}