我有一个以这种方式构造的tsconfig.json文件。
{
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"jsx": "react-native",
"lib": ["dom", "esnext"],
"moduleResolution": "node",
"noEmit": true,
"skipLibCheck": true,
"resolveJsonModule": true,
"strict": true,
"noImplicitAny": false,
"baseUrl": "./",
"paths": {
"components/*": ["./app/components"],
"components/*/*": ["./app/components/*/index"],
"services/*": ["./app/services"],
"app/*": ["./app"],
"navigation/*": ["./app/navigation"],
"theme/*": ["./app/theme/*"]
}
}
}
我对此行有疑问:
"components/*/*": ["./app/components/*/index"],
TS抱怨以下事实:
Pattern 'components/*/*' can have at most one '*' character.
这使我的进口商品无穷无尽,目前我非常困惑,找不到任何遇到相同问题的人。 有人可以帮我摆脱这个兔子洞吗?