Luehang / react-paypal-button-v2

An easy and simple to use React button component to implement PayPal Checkout with Smart Payment Buttons V2 (Version 2).
https://luehangs.site/lue_hang/projects/react-paypal-button-v2
MIT License
273 stars 81 forks source link

[BUG] not exported types #35

Closed bombek92 closed 4 years ago

bombek92 commented 4 years ago

To Do First

Software Package Version: 2.4.1

Excuse me, for removing the issue schema, but I noticed that even tough you do use typescript, the types aren't properly builded/exported into npm.

Can you fix it?

esemeniuc commented 4 years ago

I'm running into the same issue, please export the types on 2.6.1

There are instructions at: https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html

LeafHacker commented 4 years ago

The package.json indicates the types should be at dist/index.d.ts however they don't appear to have been exported. image

devuxer commented 4 years ago

@Jonasfranz,

Do you have a quick workaround to allow us to use this in a TypeScript project until the pull request is available? Thx!

jonasfranz commented 4 years ago

@devuxer You can use the master branch of my repository in your project. Simply replace the version number in your package.json file with: github:jonasfranz/react-paypal-button-v2#master

devuxer commented 4 years ago

@jonasfranz, Ahh, so that's how you do it. I ended up just cloning the original project then manually applying the changes in your pull request (which wasn't bad since only a couple files). I hadn't thought of cloning from yours, though. Will do that next time. TIL! Thanks for your help 😎