iaphub / react-native-iaphub

The easiest way to implement IAP (In-app purchase) in your React Native app.
https://www.iaphub.com/
MIT License
317 stars 21 forks source link

Typescript definitions gone and module not being recognized by TS. #114

Closed Victor-ARC closed 2 years ago

Victor-ARC commented 2 years ago

Hi. I'm having trouble with this plugin on a RN project that relies heavily on typescript. I found an old issue here about a user who submitted a PR with TS definitions, But, that was back in mid-2020, and probably several versions before today's 7.0.8. This new version lacks those definitions. I went through the node_modules files and found that the project itself is in typescript, but the TS compiler and the VS Code TS tool still marks it as Cannot find module 'react-native-iaphub' or its corresponding type declarations. ts(2307). I could certainly get around this issue manually, but I'd rather I didn't, that'd make it unmaintainable eventually.

Furthermore, I'm attaching a capture of the expanded file tree as it got downloaded from NPM. Dependency as downloaded by NPM

Are missing d.ts files a bug? Or, is it intentional? I did try to install @types/react-native-iaphub but, clearly, it failed (I mean, I had to try :D ).

Thank you for the plugin and at least reading me :)

dreamkyr commented 2 years ago

Same issue on my typescript project. Thanks for the great package though!

iaphub commented 2 years ago

Thanks for the feedback @MainReactor @thomasgit123! The issue should be fixed in the new release we just deployed (7.0.9) 🙂

Victor-ARC commented 2 years ago

Thanks for the feedback @MainReactor @thomasgit123! The issue should be fixed in the new release we just deployed (7.0.9) 🙂

Thank you, 😃. It is fixed.

Cheers!