在TypeScript文件中使用node.d.ts时编译错误

我正在研究我的第一个node.js项目(用于学习的目的),我希望使用TypeScript作为Visual Studio代码的select语言(是的,我不是在寻找简单的方法)。 源代码在这里: https : //github.com/thecoderok/ukrbash-node当我在源代码中引用node.d.ts时,我得到了大量的编译

错误如:urkbash-node \ typings \ node \ node.d.ts(178,36):错误TS1005:';' 预期。 urkbash-node \ typings \ node \ node.d.ts(425,5):错误TS1008:意外的标记; 'module,class,interface,enum,import or statement'expected。 urkbash-node \ typings \ node \ node.d.ts(425,12):错误TS1008:意外的标记; 'module,class,interface,enum,import or statement'expected。 urkbash-node \ typings \ node \ node.d.ts(425,17):错误TS1005:';' 预期。

有谁知道为什么以及如何解决它?

错误如:urkbash-node \ typings \ node \ node.d.ts(178,36):错误TS1005:';' 预期。

考虑到这里的行的内容看起来像你正在使用TypeScript 1.4(它没有联盟types)。 请更新VS Code到最新使用TS 1.5