VUE_TS项目中类型使用any 报警告Unexpected any. Specify a different type.eslint@typescript-eslint/no-explicit-an

Posted 清和时光

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了VUE_TS项目中类型使用any 报警告Unexpected any. Specify a different type.eslint@typescript-eslint/no-explicit-an相关的知识,希望对你有一定的参考价值。

在使用TS 编写VUE代码,使用any类型报警告如下

解决方案:
在.eslintrc.js文件的rules添加关闭any类型警告配置

module.exports = 
  rules: 
    \'@typescript-eslint/no-explicit-any\':\'off\'//关闭any类型警告
  

以上是关于VUE_TS项目中类型使用any 报警告Unexpected any. Specify a different type.eslint@typescript-eslint/no-explicit-an的主要内容,如果未能解决你的问题,请参考以下文章

umi中TS报错:TS7026: JSX element implicitly has type ‘any’…

vue使用ts时总是用any

typescript 编译报错 不能用于索引类型

从“数据?”到不相关的类型 '[String : Any]' 总是失败

eclipse使用tomcat打开maven项目时,报警告 警告: [SetContextPropertiesRule]{Context} Setting property 'source&

express typescript err throw 'any' 警告