我尝试将现有的 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
。
希望有人能给我提示我的环境有什么问题。