键入错误“模块的默认导出具有或正在使用私有名称". -从打字稿v1.8切换到2 [英] Typing error "Default export of the module has or is using private name" - switch from typescript v1.8 to 2
问题描述
我已将离子应用程序从Beta 11更新为rc0.因此,这意味着我已经从angular2 rc4切换到稳定的angular2,并且从打字稿1.8切换到了2.
我有一个redux架构,正在使用Redux库.
这行代码给我以下错误
export default combineReducers({
user,songs,app
})
错误TS4082:模块的默认导出具有或正在使用私有的 名称为减速器".
关于发生的事情以及如何解决这个问题的任何想法?
当我从redux库中显式导入 Reducer 时,错误消失了.
import { combineReducers, Reducer } from 'redux'
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?
The error went away when I made an explicit import of Reducer from the redux library.
import { combineReducers, Reducer } from 'redux'
这篇关于键入错误“模块的默认导出具有或正在使用私有名称". -从打字稿v1.8切换到2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!