我已经克隆了TempHire并在VS2015(更新3)中打开了解决方案,但是我收到了以下gulp构建错误: -
C处的错误:/Users/Paul/Source/Repos/temphire.angular2/TempHire/node_modules/@types/jasmine/index.d.ts:39:38:参数初始值设定项仅允许在函数或构造函数中使用实现。 错误在C:/Users/Paul/Source/Repos/temphire.angular2/TempHire/node_modules/@types/jasmine/index.d.ts:39:46:找不到名称' keyof'。 错误在C:/Users/Paul/Source/Repos/temphire.angular2/TempHire/node_modules/@types/jasmine/index.d.ts:39:52:' ='预期
index.d.ts的第39行看起来像这样: - 声明函数spyOn(object:T,method:keyof T):jasmine.Spy;
答案 0 :(得分:0)
这与您使用的Jasmine版本以及Visual Studio正在使用的TypeScript版本存在兼容性问题。您应该可以通过upgrading TypeScript解决此问题。
请注意,Visual Studio安装的TypeScript版本可能与您在package.json中指定的版本不同。