Paraboly / react-native-card

Fully customizable Card View Components for React Native.
http://www.paraboly.com
MIT License
130 stars 10 forks source link

Could not find a declaration file for module '@paraboly/react-native-card' #10

Closed Ahmdrza closed 4 years ago

Ahmdrza commented 4 years ago

I am getting this error in vscode. I can't find type definitions.

WrathChaos commented 4 years ago

Hello @Ahmdrza,

Did you run this command and install the library right?

npm i @paraboly/react-native-card

Also, can you check which version are you trying to install?

skibaalex commented 4 years ago

its just missing a types file

WrathChaos commented 4 years ago

its just missing a types file

what do you mean? I can fix it can you explain it a bit more?

skibaalex commented 4 years ago

So typescript is basically a version of JavaScript that compiles into JavaScript code. In order to make you that there are no issues you need to declare in a .d.ts the types of the variables and the functions return value for example FunctionsName: string() { return ‘i return a strong’ }

WrathChaos commented 4 years ago

Oh I totally misunderstood, I got it. I will generate the type files with typescript :) I will inform you when it is done.

skibaalex commented 4 years ago

you can just make a declaration fire decs.d.ts in the root folder of you project. add it to the tsconfig.ts file in the includes array. and just declare the module in that file declare module 'module_name'

WrathChaos commented 4 years ago

Hello @skibaalex and @Ahmdrza, Finally, new version 1.0.0 is here :) Please take a look