fix a ton of typescript errors

This commit is contained in:
Eduard Heimbuch
2020-01-08 13:40:07 +01:00
parent 15a9a5b09b
commit a43ffacf03
41 changed files with 229 additions and 311 deletions

View File

@@ -8,6 +8,7 @@ import { modifyRepo, isModifyRepoPending, getModifyRepoFailure, modifyRepoReset
import { History } from "history";
import { ErrorNotification } from "@scm-manager/ui-components";
import { ExtensionPoint } from "@scm-manager/ui-extensions";
import { compose } from "redux";
type Props = {
loading: boolean;
@@ -71,7 +72,7 @@ class EditRepo extends React.Component<Props> {
}
}
const mapStateToProps = (state, ownProps) => {
const mapStateToProps = (state: any, ownProps: Props) => {
const { namespace, name } = ownProps.repository;
const loading = isModifyRepoPending(state, namespace, name);
const error = getModifyRepoFailure(state, namespace, name);
@@ -81,7 +82,7 @@ const mapStateToProps = (state, ownProps) => {
};
};
const mapDispatchToProps = dispatch => {
const mapDispatchToProps = (dispatch: any) => {
return {
modifyRepo: (repo: Repository, callback: () => void) => {
dispatch(modifyRepo(repo, callback));
@@ -92,7 +93,4 @@ const mapDispatchToProps = dispatch => {
};
};
export default connect(
mapStateToProps,
mapDispatchToProps
)(withRouter(EditRepo));
export default compose(connect(mapStateToProps, mapDispatchToProps), withRouter)(EditRepo);