Sivo 悉见

vue axios S7006: Parameter 'res' implicitly has an 'any' type

匿名 · 更新于 2020/4/24

在tsconfig.json配置文件中设置noImplicitAny为false,如下所示

{
  "compilerOptions": {
    "target": "esnext",
    "module": "esnext",
    "noImplicitAny": false, //设置noImplicitAny为false
    "strict": true,
    "jsx": "preserve",
    "importHelpers": true,
    "moduleResolution": "node",
    "experimentalDecorators": true,
    "esModuleInterop": true,
    "allowSyntheticDefaultImports": true,
    "sourceMap": true,
    "baseUrl": "",
    "types": [
      "webpack-env"
    ],
    "paths": {
      "@/*": [
        "src/*"
      ]
    },
    "lib": [
      "esnext",
      "dom",
      "dom.iterable",
      "scripthost"
    ]
  },
  "include": [
    "src/**/*.ts",
    "src/**/*.tsx",
    "src/**/*.vue",
    "tests/**/*.ts",
    "tests/**/*.tsx"
  ],
  "exclude": [
    "node_modules"
  ]
}