Typing error “Default export of the module has or is using private name” - switch from typescript v1.8 to 2

一曲冷凌霜 提交于 2020-08-25 04:14:09

问题


I've updated my ionic app from beta 11 to rc0. So it means I've switched from angular2 rc4 to angular2 stable and from typescript 1.8 to 2.

I have a redux architecture and am using the Redux library.

This line of code is giving me the following error

export default combineReducers({
  user,songs,app
})

error TS4082: Default export of the module has or is using private name 'Reducer'.

Any idea on what's going on and how to solve this?


回答1:


The error went away when I made an explicit import of Reducer from the redux library.

import { combineReducers, Reducer } from 'redux'


来源:https://stackoverflow.com/questions/39807253/typing-error-default-export-of-the-module-has-or-is-using-private-name-switc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!