Skip to content

报错记录

  • TS:元素隐式具有 “any“ 类型,因为类型为 “any“ 的表达式不能用于索引类型

  • 解决:tsconfig.json 文件添加字段 compilerOptions.suppressImplicitAnyIndexErrors 设为 true

tsconfig.json

json
{
  "compilerOptions": {
    "suppressImplicitAnyIndexErrors": true,
  }
}