原因:项目默认开启了类型推断
解决方法:在eslintrc.js的rules中增加一行"@typescript-eslint/no-inferrable-types" : “off”,从而关闭类型判断,即可解决。
vue3+typeScript项目运行提示Type string trivially inferred from a string literal, remove type annotatio怎么解决
最新推荐文章于 2024-04-28 10:55:39 发布
原因:项目默认开启了类型推断
解决方法:在eslintrc.js的rules中增加一行"@typescript-eslint/no-inferrable-types" : “off”,从而关闭类型判断,即可解决。