我使用反应管理和打字稿。
我更喜欢使用strict类型检查。所以当我运行时tsc,react admin 向我显示一个implicitly any错误。
虽然我用了"skipLibCheck": true,但是还是报错了。我该如何修复它?
node_modules/ra-core/src/auth/useCheckAuth.ts:101:26 - error TS7006: Parameter 'error' implicitly has an 'any' type.
101 const getErrorMessage = (error, defaultMessage) =>
~~~~~
Run Code Online (Sandbox Code Playgroud)
下面是我的 tsconfig 文件。
{
"compilerOptions": {
"baseUrl": ".",
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"paths": {
"@components/*": ["components/*"],
"@styles/*": ["styles/*"],
"@lib/*": ["lib/*"],
"@pages/*": ["pages/*"] …Run Code Online (Sandbox Code Playgroud)