yezihaohao / react-admin

:sparkles: react-admin system solution : react 后台管理系统解决方案
https://admiring-dijkstra-34cb29.netlify.com/
MIT License
6.64k stars 1.87k forks source link

Tuple type '[any, ISetAlita]' of length '2' has no element at index '2'. TS2493 问题 #125

Closed morgeq closed 3 years ago

morgeq commented 4 years ago

QQ截图20200921211111 Failed to compile D:/www/react-admin/src/App.tsx TypeScript error in D:/www/react-admin/src/App.tsx(96,30): Tuple type '[any, ISetAlita]' of length '2' has no element at index '2'. TS2493

94 | const App = (props: AppProps) => {
95 |     const [collapsed, setCollapsed] = useState<boolean>(false);

96 | const [auth, responsive, setAlita] = useAlita( | ^ 97 | { auth: { permissions: null } }, 98 | { responsive: { isMobile: false } }, 99 | { light: true } This error occurred during the build time and cannot be dismissed. !

morgeq commented 4 years ago

const [auth, setAlita] = useAlita( { auth: { permissions: null } }, { light: true, } ); const [responsive] = useAlita( { responsive: { isMobile: false } }, );

搞定

yezihaohao commented 3 years ago

已修复,拉取最新代码