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

Could not find a declaration file for module '@eabdullazyanov/react-native-sms-user-consent'. #22

Closed
dogankablan opened this issue Jan 6, 2023 · 1 comment

Comments

@dogankablan
Copy link

Greetings. I am installing the package with yarn. However, I am facing such a problem while importing.

Could not find a declaration file for module '@eabdullazyanov/react-native-sms-user-consent'. '/Users/dogan.kablan/Documents/hangikredi.mobile.rn/node_modules/@eabdullazyanov/react-native-sms-user-consent/index.js' implicitly has an 'any' type.
Try npm i --save-dev @types/eabdullazyanov__react-native-sms-user-consent if it exists or add a new declaration (.d.ts) file containing declare module '@eabdullazyanov/react-native-sms-user-consent';

@gyrgy
Copy link

gyrgy commented Jan 6, 2023

Hey,
I'm not a maintainer here but was following the repo for a while and just have seen your question.

It means that there is no typescript support for the package. As the error message says you could create a declaration file where you declare the module.
If you declare a type or a module inside a d.ts file will be available in your entire project.
So, for example you could create a file named: react-native-sms-user-consent.d.ts in your type folder or where ever you feel it comfortable and add the following content:
declare module '@eabdullazyanov/react-native-sms-user-consent';
The error message should be gone.

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

3 participants