2017-06-29 47 views
5

当我尝试在tsconfig.json中设置"types": []时,我遇到了以下错误error TS6044: Compiler option 'types' expects an argument.错误TS6044:编译器选项'类型'需要参数

我们使用咕噜-TS这是通过官方的TS文件,以便推荐

摆脱以下错误:node_modules/@types/angular/index.d.ts(14,9): error TS2403

Here is the link to TS documentation

指定 “类型”: ]禁用自动包含@types包。但

,而不是禁用自动列入@types的我看到错误error TS6044: Compiler option 'types' expects an argument.

有人能帮助我吗?

回答

0

最后,我已经解决了我指定茉莉花类型 “types”的问题:[“jasmine”]

1

我建议使用tsconfig.json passthrough与该参数和grunt-ts。 TypeScript 2.x中的一些新功能在命令行中效果不佳或根本不起作用。或者,您可以尝试使用grunt-ts的additionalFlags功能,并将“”作为类型值。我不是靠近电脑来测试它,但它可以工作。