【问题标题】:error TS6044: Compiler option 'types' expects an argument错误 TS6044:编译器选项“类型”需要一个参数
【发布时间】:2017-06-29 08:30:13
【问题描述】:

尝试在 tsconfig.json 中设置 "types": [] 时遇到以下错误 error TS6044: Compiler option 'types' expects an argument.

我们正在使用 grunt-ts

这是官方 TS 文档推荐的,以消除以下错误:node_modules/@types/angular/index.d.ts(14,9): error TS2403

Here is the link to TS documentation

指定 "types": [] 以禁用自动包含 @types 包。

但我没有禁用@types 的自动包含,而是看到错误error TS6044: Compiler option 'types' expects an argument.

有人可以帮我吗?

【问题讨论】:

    标签: typescript grunt-ts


    【解决方案1】:

    我建议使用带有该参数和 grunt-ts 的 tsconfig.json 直通。 TypeScript 2.x 时间框架中的一些新功能不能很好地工作,或者根本不能从命令行运行。或者,您可以尝试使用 grunt-ts 的附加标志功能并将 "" 作为类型值传递。我不在电脑附近进行测试,但它可以工作。

    【讨论】:

      【解决方案2】:

      我终于解决了在类型中指定茉莉花的问题 “类型”:[“茉莉花”]

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2015-12-16
        • 1970-01-01
        • 2021-10-24
        • 2012-12-08
        • 2019-07-17
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多