【发布时间】:2016-05-27 23:08:57
【问题描述】:
我尝试将现有的 ES6 代码库迁移到 TypeScript 1.8。为了平滑路径,我尝试应用以下 typescript 编译器设置:
{
"compilerOptions": {
"target": "es6",
"allowJs": true,
"sourceMap": true,
"jsx": "react",
"outDir": "built"
},
"exclude": [
"node_modules"
]
}
使用tsc 编译后,类型定义文件中有大量编译错误。
例子:
typings/main/definitions/sinon/sinon.d.ts(436,1): error TS2300: Duplicate identifier 'export='.
typings/main/definitions/sinon/sinon.d.ts(440,1): error TS2300: Duplicate identifier 'export='.
类型定义由typings维护。
希望有人能给我提示一下我的环境出了什么问题。
【问题讨论】: