Fixes to redux dependers (#20768)

This commit is contained in:
Andy
2017-10-23 08:02:18 -07:00
committed by GitHub
parent ac82b736cf
commit 07092cc758
6 changed files with 10 additions and 8 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
// Definitions by: Valbrand <https://github.com/Valbrand>
// viggyfresh <https://github.com/viggyfresh>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
// TypeScript Version: 2.4
import {
Dispatch,
@@ -32,9 +32,7 @@ const {
initialDispatch: false
});
const dumbMiddleware: Middleware = (store: MiddlewareAPI<LocationState>) => (next: Dispatch<LocationState>) => (action: Action) => {
next(action);
};
const dumbMiddleware: Middleware = store => next => action => next(action);
const composedMiddleware = applyMiddleware(middleware, dumbMiddleware);
+2 -1
View File
@@ -2,7 +2,8 @@
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
+3 -1
View File
@@ -2,6 +2,8 @@
"extends": "dtslint/dt.json",
"rules": {
// TODO
"no-any-union": false
"no-any-union": false,
"no-unnecessary-callback-wrapper": false,
"no-unnecessary-generics": false
}
}
@@ -20,7 +20,7 @@ function counter(state: any, action: any) {
function loggingMiddleware() {
return (next: Redux.Dispatch<any>) => (action: any) => {
console.log(action.type);
next(action);
return next(action);
};
}
+2 -1
View File
@@ -2,6 +2,7 @@
"extends": "dtslint/dt.json",
"rules": {
// TODO
"dt-header": false
"dt-header": false,
"no-unnecessary-generics": false
}
}