vue+ts any类型警告 Unexpected any. Specify a different type.eslint(@typescript-eslint/no-explicit-any)
关闭any类型警告:
我用的是vue/cli 4.5.6,可以在package.json里的rules加入规则:
"@typescript-eslint/no-explicit-any": ["off"]
![](https://img.haomeiwen.com/i15101365/b442d27a9325e0c3.png)
另外可以在.eslintrc.js中的rules 添加上面代码即可。
vue+ts any类型警告 Unexpected any. Specify a different type.eslint(@typescript-eslint/no-explicit-any)
关闭any类型警告:
我用的是vue/cli 4.5.6,可以在package.json里的rules加入规则:
"@typescript-eslint/no-explicit-any": ["off"]
另外可以在.eslintrc.js中的rules 添加上面代码即可。
本文标题:vue+ts any类型警告 Unexpected any.
本文链接:https://www.haomeiwen.com/subject/cocvpktx.html
网友评论