Kishanjvaghela / react-native-cardview

Native CardView for react-native (All Android version and iOS)
https://www.npmjs.com/package/react-native-cardview
MIT License
510 stars 82 forks source link

Could not find a declaration file for module. #65

Open binishmanandhar23 opened 4 years ago

binishmanandhar23 commented 4 years ago

Could not find a declaration file for module 'react-native-cardview'. '/Users/bishes/Desktop/Workspace/VantageBit/pasls/app/node_modules/react-native-cardview/index.js' implicitly has an 'any' type. Try npm install @types/react-native-cardview if it exists or add a new declaration (.d.ts) file containing declare module 'react-native-cardview';ts(7016)

I was trying to use this library but after installation when I was importing the module I stumbled upon the above issue and I've been trying to solve it for the past couple of days yet I cannot find the solution. Please do have a look and help me resolve this.

huaiguoguo commented 4 years ago

define file named typing/index.d.ts in your project, and write

declare module 'react-native-cardview'{
  //paste the contents of the official document index.d.ts here
}