首页 > 解决方案 > tsc 和嵌套的 tsconfigs

问题描述

TS 3.5 我有以下配置在开发过程中与 tsserver 一起工作正常:

/tsconfig.json <= "strict": true
  /nested/tsconfig.json <= extends parent tsconfig, "noImplicitThis": false
  /nested/some ts code <= has implicit this

所以我的父配置定义了严格的 true,并且项目中的大多数代码都符合这个规则。但是在名为的文件夹nested中有一个不符合 whit 的代码noImplicitThis,所以我在那里添加了tsconfig.json那个extends父级tsconfig并将 compilerOptionnoImplicitThis设置为false.

而且我在使用vscode.

但是当我尝试做tsc -p .(在根目录中)时,我在nested文件夹代码中得到“隐式这个”的错误。

所以我不知道如何在nested/**使用tsc.

标签: typescripttsc

解决方案


推荐阅读