react-hot-loader - Added library version number, make errorReporter compatible with non-stateless React components

This commit is contained in:
Jacek Jagiello
2016-11-12 10:40:45 +01:00
parent a28743f648
commit 2bfcbef012
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
// Type definitions for react-hot-loader
// Type definitions for react-hot-loader 3.0.0-beta.6
// Project: https://github.com/gaearon/react-hot-loader
// Definitions by: Jacek Jagiello <https://github.com/jacekjagiello/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -13,7 +13,7 @@ declare module "react-hot-loader" {
export interface AppContainerProps {
children?: React.ReactElement<any>,
errorReporter?: React.StatelessComponent<ErrorReporterProps>
errorReporter?: React.ComponentClass<ErrorReporterProps> | React.StatelessComponent<ErrorReporterProps>
}
export class AppContainer extends React.Component<AppContainerProps, {}> {}
+1 -1
View File
@@ -18,7 +18,7 @@ class AppContainerTest extends React.Component<any, any> {
public render() {
return (
<div>
<AppContainer errorReporter={ErrorReporter}>
<AppContainer errorReporter={ErrorReporterComponent}>
<DummyComponent />
</AppContainer>
</div>