@types/react-native-purchases
Please export types for TS through definitelytyped.
Thanks.
Hi @bithavoc, more than through definitelytyped, we will be refactoring this react-native wrapper to TypeScript soon, and therefore exporting the types ourselves.
Will leave this issue open until we do.
Hey guys, Any update on this?
They don’t give a fuck, Jacob sent me an email asking why I didn’t finish my integration to AppStore, I laughed.
Hi @oaosman84!, sorry about the delay, been pretty busy building features and have had this in the back on my head but haven't had time to get around to it yet.
I will get to this by this week
Hey @bithavoc. We give lots of fucks, just super busy. We have 7 SDKs and only one person working on them full time.
If you know anyone, we're hiring: https://jobs.lever.co/revenuecat
Should this work for v3 releases, or is it yet to be formally released? I can see an index.d.ts but the types don't seem to work when I import them.
@matt-dalton, you are correct, types seem to not been linked, a new release with the fix will be published soon, thanks for the heads up!
Haha cool thanks - easy enough for me to export them myself with a patch in the short-term.
The new API is looking great otherwise!
The types are correctly linked since they are in the root as index.d.ts and typescript can find them there by default. What was misisng was the export of the interfaces so that you can use them in your typescript code. I just released 3.0.5 that should address that. Sorry about that @matt-dalton !
Would it also be possible to export the enums, specifically PACKAGE_TYPE? We've found that useful when writing robust code on our end.
I didn't export the enums because they are already accessible through the Purchases class. You can do Purchases.PACKAGE_TYPE.
But then if I try and use it as a type (e.g. for typing args), I get an error. e.g.
type PACKAGE_TYPE = Purchases.PACKAGE_TYPE
// 'Purchases' only refers to a type, but is being used as a namespace here
Most of the answers online around this seem to suggest updating the definition
Got it, will update it now then 👍
Just released https://github.com/RevenueCat/react-native-purchases/releases/tag/3.0.6 @matt-dalton
Let us know if you have any other request. Cheers!
Amazing! Works - thanks!