stripe / stripe-js

Loading wrapper for Stripe.js
https://stripe.com/docs/js
MIT License
633 stars 157 forks source link

[BUG]: AddressElement Type #670

Closed chris-orgorg closed 5 days ago

chris-orgorg commented 1 month ago

What happened?

Should this field be country: string | null; to match Stripe.Address.country which is string | null?

Environment

No response

Reproduction

No response

chris-orgorg commented 1 month ago

https://github.com/stripe/stripe-js/blob/8a6846031d74b8cdb50fd0d463f9443638ef9657/types/stripe-js/elements/address.d.ts#L189

stale[bot] commented 2 weeks ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

brendanm-stripe commented 5 days ago

No, the types for defaultValues are as intended, because in order to configure any prefilled address fields, you must provide the country.