【发布时间】:2015-06-08 18:08:08
【问题描述】:
我使用 Typescript 1.5.0 beta 创建了一个非常简单的项目,并在 tsd 中包含了 threejs/three 类型。编译时,tsc 输出关于 Duplicate Identifier 'identifier' 的 128 个错误。我不确定 128 是否只是 tsc 开始截断错误的地方,所以可能还有更多......
我通过创建一个空白文件夹并创建 app.ts 和 index.html 来启动该项目。然后我使用以下命令安装了 threejs/three:
tsd install threejs/three -rso
在我的 app.ts 中,我只添加了以下行,并进行了编译:
/// <reference path="typings/tsd.d.ts"/>
目前,从命令行编译就足够了,我使用的是以下命令:
tsc --module commonjs --target es5 ./app.ts
这是我从 tsc 获得的完整错误列表的链接:
https://gist.github.com/josefvanniekerk/24496b480bf488db522d
知道为什么 tsc 会抱怨吗?
【问题讨论】: