在store添加如下配置会报错Property '__REDUX_DEVTOOLS_EXTENSION__' does not exist on type 'Window & typeof globalThis'.
const store = createStore(
reducer,
window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
)
解决方法:在src下新建global.d.ts
export {}
declare global {
interface Window {
__REDUX_DEVTOOLS_EXTENSION__: Function
}
}