首页 > 解决方案 > 在角度 10 的 tsconfig.json 中找不到 typeRoots

问题描述

我想以角度 10 更新 tsconfig.json 中的 typeRoots 但 typeRoots 未在我的 tsconfig.json 文件中显示如何解决这个问题

问候白菊

标签: angulartsconfig

解决方案


您可以在 tsconfig.json 中添加typeRootscompilerOptions请参阅文档

{
  "compilerOptions": {
    "typeRoots": ["./typings", "./vendor/types"]
  }
}

推荐阅读