-
Notifications
You must be signed in to change notification settings - Fork 0
TypeScript Issue - usually optional script options are required #53
Comments
Hi @giladv we have an open issue for adding types for this library: #30. Once those types are added, it should make it easy to use react-paypal-js with typescript. What typescript setup are you using? I tried to reproduce using a new create-react-app project using the typescript template. I get the following compile error about missing types:
|
hi @gregjopa, here is my tsconfig file
either way, i believe the issue is that typescript fallbacks to proptypes if possible. so the issue is this line because you used |
@giladv thanks for sharing your TypeScript config. I'm still not able to reproduce the error unfortunately.
I see what you mean. It sounds like // An object taking on a particular shape
optionalObjectWithShape: PropTypes.shape({
color: PropTypes.string,
fontSize: PropTypes.number
}),
// An object with warnings on extra properties
optionalObjectWithStrictShape: PropTypes.exact({
name: PropTypes.string,
quantity: PropTypes.number
}), What do you think? Any suggestions on how to fix this prop-types issue? |
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment! |
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you! |
usually only the client-id is required. but it seems all of the options are required in this package
how to reproduce:
The text was updated successfully, but these errors were encountered: