【问题标题】:Typing error "Default export of the module has or is using private name" - switch from typescript v1.8 to 2键入错误“模块的默认导出具有或正在使用私有名称” - 从 typescript v1.8 切换到 2
【发布时间】:2017-02-09 23:03:18
【问题描述】:

我已将我的 ionic 应用程序从 beta 11 更新到 rc0。所以这意味着我已经从 angular2 rc4 切换到 angular2 stable 并从 typescript 1.8 切换到 2。

我有一个 redux 架构,并且正在使用 Redux 库。

这行代码给了我以下错误

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

错误 TS4082:模块的默认导出已经或正在使用私有 命名为“减速器”。

知道发生了什么以及如何解决这个问题吗?

【问题讨论】:

    标签: angular typescript redux ionic2 typescript1.8


    【解决方案1】:

    当我从 redux 库中显式导入 Reducer 时,错误消失了。

    import { combineReducers, Reducer } from 'redux'
    

    【讨论】:

    • 这会产生另一个问题:未使用的导入
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-09-16
    • 2022-06-25
    • 2017-10-26
    • 2017-02-23
    • 1970-01-01
    • 2016-05-15
    • 2020-03-22
    相关资源
    最近更新 更多