更改打字稿配置以不接受“任何”

Noa*_* Lc 4 typescript tsconfig tsx

有什么方法可以使 tsConfig 停止接受“任何”类型。我已经添加"noImplicitAny": true但仍然接受“any”作为类型。

Tom*_*mos 7

"noImplicitAny": true适用于隐式 any (因此,如果将类型推断为 ,则会出现错误any,而不是在您显式写入any代码时出现错误)。

不过有一个检查eslint-typescript