Error with Redux DevTools Extension using TS: “Property '__REDUX_DEVTOOLS_EXTENSION_COMPOSE__' does not exist on type 'Window'.”?

前端 未结 7 1782
一个人的身影
一个人的身影 2021-02-01 12:43

I\'m getting this error on my index.tsx.

Property \'REDUX_DEVTOOLS_EXTENSION_COMPOSE\' does not exist on type \'Window\'.

Here is my index.tsx

7条回答
  •  情歌与酒
    2021-02-01 13:30

    My approach to the issue was the following:

    export const composeEnhancers =
      (window && (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__) || compose;
    

提交回复
热议问题