相关疑难解决方法(0)

混淆"重复标识符"Typescript错误消息

为什么我会得到这个以及更多此类错误?我正在添加一个指向repo的链接以及下面的关键代码片段.我认为我对依赖和"包含"链接如何工作有一个基本的误解.

csvproc(master)> tsc
node_modules/typescript/bin/lib.core.d.ts(83,5): error TS2300: Duplicate identifier 'configurable'.
node_modules/typescript/bin/lib.core.d.ts(84,5): error TS2300: Duplicate identifier 'enumerable'.
node_modules/typescript/bin/lib.core.d.ts(85,5): error TS2300: Duplicate identifier 'value'.
node_modules/typescript/bin/lib.core.d.ts(86,5): error TS2300: Duplicate identifier 'writable'.
Run Code Online (Sandbox Code Playgroud)

所有代码都可以在这里找到.

我的tsconfig.json:

{
    "compilerOptions": {
        "module": "commonjs",
        "noImplicitAny": false,
        "outDir": "built/",
        "sourceMap": true,
        "target": "es5"
    }
}
Run Code Online (Sandbox Code Playgroud)

我的tsd.json:

{
  "version": "v4",
  "repo": "borisyankov/DefinitelyTyped",
  "ref": "master",
  "path": "typings",
  "bundle": "typings/tsd.d.ts",
  "installed": {
    "node/node-0.10.d.ts": {
      "commit": "6387999eb899d0ba02d37dd8697647718caca230"
    },
    "should/should.d.ts": {
      "commit": "e1182d56ccb192379eade6055d9ba3fb6a0bacc4"
    }
  }
}
Run Code Online (Sandbox Code Playgroud)

我的tsd.d.ts:

{
  "version": "v4",
  "repo": "borisyankov/DefinitelyTyped",
  "ref": "master",
  "path": …
Run Code Online (Sandbox Code Playgroud)

typescript

212
推荐指数
7
解决办法
19万
查看次数

标签 统计

typescript ×1