intellidev1991 / react-native-image-slider-box

A simple and fully customizable React Native component that implements an Image Slider UI.
MIT License
279 stars 100 forks source link

Add TypeScript Support #121

Open therealkh opened 2 years ago

therealkh commented 2 years ago

I am facing this error when importing library on my code.

Could not find a declaration file for module 'react-native-image-slider-box'. '.../node_modules/react-native-image-slider-box/index.js' implicitly has an 'any' type. Try npm i --save-dev @types/react-native-image-slider-box if it exists or add a new declaration (.d.ts) file containing declare module 'react-native-image-slider-box';

manutheblacker commented 2 years ago

I'm having the same issue, is their any workaround?

sagar17-create commented 2 years ago

I'm having the same issue, is their any workaround? CREATE A FOLDER name types and inside that create another folder classnames . Iinside the classnames create a file name index.ts After creating inside the index.ts file type : declare module 'react-native-image-slider-box';

This process will allow the react-native-image-slider-box package on any types which will run as a plain javascript which will make our jobs done