我使用的是 vue3 + typescript + eslint
解决方法
在.eslintrc.js文件的rules 增加一行 "@typescript-eslint/no-inferrable-types": "off" // 关闭类型推断
rules: { "no-console": process.env.NODE_ENV === "production" ? "warn" : "off" , "no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off" , "@typescript-eslint/no-inferrable-types": "off" // 关闭类型推断 }
查看更多关于Type string trivially inferred from a string liter的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did223277