Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Typescript #4014

Closed
llioor opened this issue Nov 20, 2019 · 7 comments
Closed

Implement Typescript #4014

llioor opened this issue Nov 20, 2019 · 7 comments

Comments

@llioor
Copy link

llioor commented Nov 20, 2019

I opened thread here: https://stackoverflow.com/questions/58958243/implement-typescript-with-react-admin for search optimizations.

I did: create-react-app with --typescript flag

Then install react admin version 3.0

and I got this in console:

Could not find a declaration file for module 'react-admin'. 
'.../node_modules/react-admin/lib/index.js' implicitly has an 'any' type.
Try `npm install @types/react-admin` if it exists or add a new declaration (.d.ts)
 file containing `declare module 'react-admin';`

Any advice please or a guide please?

@bicstone
Copy link
Contributor

@llioor
SEE #3194 (comment)

@fzaninotto
Copy link
Member

TypeScript types is an ongoing effort. No need for a Github issue to track it.

@llioor
Copy link
Author

llioor commented Nov 21, 2019 via email

@fzaninotto
Copy link
Member

This error shows up because you’ve configured typescript to work only with typescript modules, and react-admin only publishes a JS module. If you still want to use react-admin, you’ll need to alter your TS configuration. Refer to the TS doc for a guide on how to do that.

@mehrad77
Copy link

How can we help to imlementing TypeScript? it's essential for us.

@fzaninotto
Copy link
Member

Convert JS files from the ra-ui-matreial-ui package into TSX files and open a PR.

@Vadorequest
Copy link

Discussion regarding TS has moved to #1617 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants