好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

Type string trivially inferred from a string liter

我使用的是 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的详细内容...

  阅读:50次