我在应用程序中添加了包 @ types / underscore ,并将ts包更新为 2.4.2 版本,但是如果我尝试编译我收到了错误消息:
node_modules\@types\underscore\index.d.ts(8,1): error TS1128: Declaration or statement expected.
node_modules\@types\underscore\index.d.ts(8,11): error TS1005: ';' expected.
node_modules\@types\underscore\index.d.ts(8,22): error TS1005: '{' expected.
对应
export as namespace _;
这些是ts参数:
.pipe(tsc({
target: 'ES6',
declarationFiles: false,
noExternalResolve: true,
inlineSources: true,
inlineSourceMap: true,
types: [ "underscore", "cordova-plugin-camera" ]
}))
我错过了什么?
答案 0 :(得分:0)
您的gulp-typescript
似乎已过期。我们可以这样更新:
npm update gulp-typescript --save-dev