mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 06:47:03 +00:00
Update react-redux-toastr-tests.ts
This commit is contained in:
committed by
GitHub
parent
18780a108d
commit
e6e922c65a
@@ -1,6 +1,6 @@
|
||||
///<reference path="react-redux-toastr.d.ts" />
|
||||
///<reference path="../react/react.d.ts" />
|
||||
///<reference path="../react-dom/react-dom.d.ts" />
|
||||
///<reference path="../react/react-dom.d.ts" />
|
||||
///<reference path="../react-redux/react-redux.d.ts" />
|
||||
import {toastr, reducer as toastrReducer, actions} from 'react-redux-toastr';
|
||||
import ReduxToastr from 'react-redux-toastr';
|
||||
@@ -16,29 +16,6 @@ function test() {
|
||||
var providerFactory = React.createFactory(Provider);
|
||||
var root = providerFactory({ store: store }, element);
|
||||
|
||||
class Test extends React.Component<any, {}>{
|
||||
private toastr;
|
||||
constructor() {
|
||||
super()
|
||||
this.toastr = bindActionCreators(actions, this.props.dispatch);
|
||||
this.toastr.clean();
|
||||
this.toastr.success("hi");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
var TestComponent = connect(mapStateToProps, mapDispatchToProps)(Test);
|
||||
function mapDispatchToProps(dispatch) {
|
||||
return {
|
||||
actions: bindActionCreators(actions, dispatch)
|
||||
};
|
||||
}
|
||||
|
||||
function mapStateToProps(state) {
|
||||
return {};
|
||||
}
|
||||
|
||||
function callback() { }
|
||||
|
||||
toastr.clean();
|
||||
|
||||
Reference in New Issue
Block a user