【问题标题】:how to config angular-cli with typescript2.4如何使用 typescript2.4 配置 angular-cli
【发布时间】:2017-08-07 07:41:01
【问题描述】:

我使用的是 1.2.7 版本的 angular-cli,默认情况下,它使用 typescript 2.3 创建新的 angular 应用程序,但现在我想使用 typescript 2.4 的一些功能。

我尝试更新 package.json 中的 typescript,删除所有 node_modules,并再次删除 npm install,但这似乎不起作用。

如何配置我的项目,以便 angular-cli 可以使用 typescript 2.4 代替?

【问题讨论】:

  • 删除你全局安装的打字稿
  • 您可能应该删除package-lock.json 文件,然后尝试重新安装
  • 仅供参考,Typescript 2.4 支持是从 angular-cli 1.3.0-rc.0 开箱即用添加的:release notes

标签: angular angular-cli


【解决方案1】:

如果你想使用typescript 2.4,你必须使用 cli 的 1.3.0 RC 版本作为support just being added。但是请记住,angular 仍然不支持typescript 2.4,但它即将到来,您可以跟踪this issuenot stopping you to play with typescript 2.4 and cli anyway

【讨论】:

    猜你喜欢
    • 2017-11-11
    • 1970-01-01
    • 2016-12-23
    • 2018-01-23
    • 1970-01-01
    • 1970-01-01
    • 2017-04-27
    • 1970-01-01
    • 2017-03-04
    相关资源
    最近更新 更多