chargebee / chargebee-js-wrappers

25 stars 10 forks source link

Unable to add react wrapper in typescript project #117

Closed bilalgodesto closed 1 year ago

bilalgodesto commented 1 year ago

I have added latest react-wrapper in my project but i am getting below error

Could not find a declaration file for module '@chargebee/chargebee-js-react-wrapper'. '/Users/sites/project/node_modules/@chargebee/chargebee-js-react-wrapper/dist/chargebee-js-react-wrapper.common.js' implicitly has an 'any' type. Try npm i --save-dev @types/chargebee__chargebee-js-react-wrapper if it exists or add a new declaration (.d.ts) file containing declare module '@chargebee/chargebee-js-react-wrapper';ts(7016)

typescript is not bundled.

cb-farhanh commented 1 year ago

Hey @bilalgodesto Can you please share the react and typescript version of your project?

bilalgodesto commented 1 year ago

Dear Team I am using react 18 and typescript 4.9.3

On Fri, Dec 23, 2022 at 12:21 PM Farhan Halai @.***> wrote:

Hey @bilalgodesto https://github.com/bilalgodesto Can you please share the react and typescript version of your project?

— Reply to this email directly, view it on GitHub https://github.com/chargebee/chargebee-js-wrappers/issues/117#issuecomment-1363909575, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFA3F247WLGS64OJJNACJUTWOWKNHANCNFSM6AAAAAATCX2C6Y . You are receiving this because you were mentioned.Message ID: @.***>

-- Bilal RabbiDigital Head Find discounted hotels, brunches, ladies nights and much moreFilter by vouchers, available now, later or this weekDownload godesto.com Dubai available at [image: App Store] https://itunes.apple.com/us/app/godesto/id1390668542?mt=8 [image: Google Play] https://play.google.com/store/apps/details?id=com.godesto [image: Godesto.com] https://www.godesto.com best accommodation at market beating rates Office 404, Building B, Al Saaha Offices Souk Al Bahar, Old Town Island, Burj Khalifa District PO Box 487177, Dubai, UAE Phone: +971 55 113 8861 Email: @.***

TomasBalaguer commented 1 year ago

@bilalgodesto could you solve it??

jaska120 commented 1 year ago

The issue is due to the fact that the version 0.6.0 does not include the generated TS types in the dist folder, and the package.json does not have types defined as described in here.

Could you please export the types correctly from the package, and cut a new release?

cb-farhanh commented 1 year ago

We're on it. Will update with a new minor version release by next week.

cb-farhanh commented 1 year ago

We have released a new version with the types.