Angular jasmine、jasminewd2、mocha的typescript库中的重复@types(index.d.ts-重复标识符)

Angular jasmine、jasminewd2、mocha的typescript库中的重复@types(index.d.ts-重复标识符),angular,typescript,.d.ts,Angular,Typescript,.d.ts,我有茉莉花,茉莉花和摩卡在我的角项目。这些lib有index.d.ts文件,似乎是重复的。这是避免这个错误的方法吗?因为我的Visual Studio无法构建它。我已经尝试在tsconfig.json文件中排除这些文件,升级版本也没有帮助 6>C:\GIT\proj\node_modules\@types\jasmine\index.d.ts(20,18): error TS2300: Build:Duplicate identifier 'describe'. 6>C:\GIT\p

我有茉莉花,茉莉花和摩卡在我的角项目。这些lib有index.d.ts文件,似乎是重复的。这是避免这个错误的方法吗?因为我的Visual Studio无法构建它。我已经尝试在tsconfig.json文件中排除这些文件,升级版本也没有帮助

6>C:\GIT\proj\node_modules\@types\jasmine\index.d.ts(20,18): error TS2300: Build:Duplicate identifier 'describe'.
6>C:\GIT\proj\node_modules\@types\jasmine\index.d.ts(22,18): error TS2300: Build:Duplicate identifier 'xdescribe'.
6>C:\GIT\proj\node_modules\@types\jasmine\index.d.ts(31,18): error TS2300: Build:Duplicate identifier 'it'.
6>C:\GIT\proj\node_modules\@types\jasmine\index.d.ts(41,18): error TS2300: Build:Duplicate identifier 'xit'.
6>C:\GIT\proj\node_modules\@types\jasminewd2\index.d.ts(10,18): error TS2300: Build:Duplicate identifier 'it'.
6>C:\GIT\proj\node_modules\@types\jasminewd2\index.d.ts(12,18): error TS2300: Build:Duplicate identifier 'xit'.
6>C:\GIT\proj\node_modules\@types\mocha\index.d.ts(36,13): error TS2300: Build:Duplicate identifier 'describe'.
6>C:\GIT\proj\node_modules\@types\mocha\index.d.ts(37,13): error TS2300: Build:Duplicate identifier 'xdescribe'.
6>C:\GIT\proj\node_modules\@types\mocha\index.d.ts(42,13): error TS2300: Build:Duplicate identifier 'it'.
6>C:\GIT\proj\node_modules\@types\mocha\index.d.ts(43,13): error TS2300: Build:Duplicate identifier 'xit'.
6>C:\GIT\proj\node_modules\@types\jasmine\index.d.ts(20,18): error TS2300: Build:Duplicate identifier 'describe'.
6>C:\GIT\proj\node_modules\@types\jasmine\index.d.ts(22,18): error TS2300: Build:Duplicate identifier 'xdescribe'.
6>C:\GIT\proj\node_modules\@types\jasmine\index.d.ts(31,18): error TS2300: Build:Duplicate identifier 'it'.
6>C:\GIT\proj\node_modules\@types\jasmine\index.d.ts(41,18): error TS2300: Build:Duplicate identifier 'xit'.
6>C:\GIT\proj\node_modules\@types\jasminewd2\index.d.ts(10,18): error TS2300: Build:Duplicate identifier 'it'.
6>C:\GIT\proj\node_modules\@types\jasminewd2\index.d.ts(12,18): error TS2300: Build:Duplicate identifier 'xit'.
6>C:\GIT\proj\node_modules\@types\mocha\index.d.ts(36,13): error TS2300: Build:Duplicate identifier 'describe'.
6>C:\GIT\proj\node_modules\@types\mocha\index.d.ts(37,13): error TS2300: Build:Duplicate identifier 'xdescribe'.
6>C:\GIT\proj\node_modules\@types\mocha\index.d.ts(42,13): error TS2300: Build:Duplicate identifier 'it'.
6>C:\GIT\proj\node_modules\@types\mocha\index.d.ts(43,13): error TS2300: Build:Duplicate identifier 'xit'.

感谢JimiPajala,我们有了解决方案

我在tsconfig.json中添加了skipLibCheck:true

关于文件: 跳过所有声明文件.d.ts的类型检查*
多亏了JimiPajala,我们才有了解决方案

我在tsconfig.json中添加了skipLibCheck:true

关于文件: 跳过所有声明文件.d.ts的类型检查*

您试过这个吗?我看到了这一点,实际上没有解决办法。除了更新依赖项我已经做了什么。我会尝试运行带有-noLib标志的TypeScript编译器。这里有更多@JimiPajala noLib:true不能与我在tsconfig.json中的lib:[es2017,dom]一起使用,不管怎样,skipLibCheck:true似乎有帮助。我还需要做一些测试,以确保它没有破坏任何东西。因此,可以说它跳过了编译时的声明文件.d.ts文件检查,您仍然可以在VSCode或您正在使用的IDE上获得TypeScript的好处。您尝试过这个吗?我看到了这一点,实际上没有解决办法。除了更新依赖项我已经做了什么。我会尝试运行带有-noLib标志的TypeScript编译器。这里有更多@JimiPajala noLib:true不能与我在tsconfig.json中的lib:[es2017,dom]一起使用,不管怎样,skipLibCheck:true似乎有帮助。我还需要做一些测试,以确保它没有破坏任何东西。因此,可以说它跳过了声明文件。d.ts文件在编译时的检查,您仍然可以在VSCode或您正在使用的IDE上获得TypeScript的好处。我遇到了这个确切的问题,这个建议对我不起作用。我遇到了这个确切的问题,这个建议对我不起作用。