Commit 38f9d247 by 姜雷

修改window类型判断

parent 11b15c3c
...@@ -8,7 +8,3 @@ declare module '*.less'; ...@@ -8,7 +8,3 @@ declare module '*.less';
declare module '*.scss'; declare module '*.scss';
declare module '*.sass'; declare module '*.sass';
declare module '*.styl'; declare module '*.styl';
interface Window {
__REDUX_DEVTOOLS_EXTENSION_COMPOSE__: (option) => any;
}
...@@ -3,8 +3,9 @@ import thunkMiddleware from 'redux-thunk'; ...@@ -3,8 +3,9 @@ import thunkMiddleware from 'redux-thunk';
import rootReducer from './reducers'; import rootReducer from './reducers';
const composeEnhancers = const composeEnhancers =
typeof window === 'object' && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ typeof window === 'object' &&
? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({ (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__
? (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({
// Specify extension’s options like name, actionsBlacklist, actionsCreators, serialize... // Specify extension’s options like name, actionsBlacklist, actionsCreators, serialize...
}) })
: compose; : compose;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment