I\'m trying to set up a react-admin app in typescript and I can\'t quite figure out how to import react-admin. It gives me the (simple) error saying
\"Could not
Current version of react-admin does not export types definition. To make your project to compile you need to create index.d.ts
file and modify tsconfig.json
.
├── @types
│ └── react-admin
│ └── index.d.ts
└── tsconfig.json
// tsconfig.json
{
...
"compilerOptions": {
...
"typeRoots": ["./@types"],
...
},
...
}
// index.d.ts
declare module 'react-admin';
if the issue exist after after the .d.ts file creation, use "noImplicitAny": false,
in your tsconfig.json