为什么我会遇到这样的错误,还有更多这样的错误?我在下面添加了一个到回购协议的链接以及关键代码片段.我想我对依赖和"包含"链接的工作原理有一个基本的误解.

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'.

All code can be found here

我的Tconfig.json:

{
    "compilerOptions": {
        "module": "commonjs",
        "noImplicitAny": false,
        "outDir": "built/",
        "sourceMap": true,
        "target": "es5"
    }
}

我的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"
    }
  }
}

我的tsd.d、 ts:

{
  "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"
    }
  }
}

推荐答案

这是因为两件事的结合:

Fix

列出filesincludehttps://basarat.gitbook.io/typescript/docs/project/files.html?

Typescript相关问答推荐

具有实体的ngrx SignalStore中的动态类型

判断对象A中存在的对象B的键是否存在对象A中键的另一个数组值中

创建一个通用上下文,允许正确推断其中的子项

如果一个变量不是never类型,我如何创建编译器错误?

输入元素是类型变体的对象数组的正确方法是什么?'

打印脚本丢失函数的泛型上下文

如何在Angular 12中创建DisplayBlock组件?

为什么我的一个合成函数不能推断类型?

为什么&;(交集)运算符会删除不相交的属性?

对于始终仅在不是对象属性时才抛出的函数,返回Never

如何在Vue中使用Enum作为传递属性的键类型?

声明文件中的类型继承

埃斯林特警告危险使用&as";

基于闭包类型缩小泛型类型脚本函数的范围

替换typescript错误;X类型的表达式可以';t用于索引类型Y;带有未定义

TypeScript:方法获胜';t接受较窄类型作为参数

为什么我会得到一个;并不是所有的代码路径都返回一个值0;switch 中的所有情况何时返回或抛出?(来自vsCode/TypeScript)

定义一个只允许来自另一个类型的特定字符串文字的类型的最佳方式

在ts中获取级联子K类型?

如何使用 AWS CDK 扩展默认 ALB 控制器策略?