Argument type {interpolation: {escapeValue: ...}, debug: ..., backend: ..., } is not assignable to parameter type Callback | undefined

35 Views Asked by At

I have a problem with i18next for react in Webstorm. Everything works but in i18n.ts where I init i18n, I have this code underlined with red and this error. i18n.ts

Also, I have a similar problem with t() function from useTranslation. t() function usage

My dependencies and devDependencies

"devDependencies": {
    "@svgr/webpack": "^8.1.0",
    "@types/copy-webpack-plugin": "^10.1.0",
    "@types/node": "^20.11.16",
    "@types/react": "^18.2.53",
    "@types/react-dom": "^18.2.18",
    "@types/react-router-dom": "^5.3.3",
    "@types/webpack": "^5.28.5",
    "@types/webpack-dev-server": "^4.7.2",
    "@typescript-eslint/eslint-plugin": "^6.21.0",
    "@typescript-eslint/parser": "^6.21.0",
    "css-loader": "^6.10.0",
    "eslint": "^8.56.0",
    "eslint-config-standard-with-typescript": "^43.0.1",
    "eslint-config-xo": "^0.44.0",
    "eslint-config-xo-typescript": "^2.0.0",
    "eslint-plugin-i18next": "^6.0.3",
    "eslint-plugin-import": "^2.29.1",
    "eslint-plugin-n": "^16.6.2",
    "eslint-plugin-promise": "^6.1.1",
    "eslint-plugin-react": "^7.33.2",
    "eslint-plugin-unused-imports": "^3.0.0",
    "file-loader": "^6.2.0",
    "html-webpack-plugin": "^5.6.0",
    "mini-css-extract-plugin": "^2.8.0",
    "sass": "^1.70.0",
    "sass-loader": "^14.1.0",
    "style-loader": "^3.3.4",
    "stylelint": "^16.2.1",
    "stylelint-config-standard-scss": "^13.0.0",
    "ts-loader": "^9.5.1",
    "ts-node": "^10.9.2",
    "typescript": "^5.3.3",
    "webpack": "^5.90.1",
    "webpack-cli": "^5.1.4",
    "webpack-dev-server": "^4.15.1"
  },
  "dependencies": {
    "i18next": "^23.8.2",
    "i18next-browser-languagedetector": "^7.2.0",
    "i18next-http-backend": "^2.4.3",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "react-i18next": "^14.0.4",
    "react-router-dom": "^6.22.0"
  }

tsconfing file

{
  "compilerOptions": {
    "outDir": "./dist/",
    "noImplicitAny": true,
    "module": "ESNext",
    "target": "es5",
    "jsx": "react-jsx",
    "allowJs": true,
    "moduleResolution": "node",
    "baseUrl": ".",
    "paths": {
      "*": [ "./src/*" ]
    },
    "esModuleInterop": true,
    "allowSyntheticDefaultImports": true,
    "lib": [
      "ESNext",
      "dom",
    ]
  },
  "ts-node": {
    "compilerOptions": {
      "module": "CommonJS"
    }
  }
}
0

There are 0 best solutions below