Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add address element types #352

Merged
merged 4 commits into from Sep 21, 2022
Merged

Add address element types #352

merged 4 commits into from Sep 21, 2022

Conversation

graceg-stripe
Copy link
Contributor

Summary & motivation

Added types for address element and marked shippingAddress as deprecated.

Testing & documentation

Added invalid and valid tests

types/stripe-js/elements/address.d.ts Outdated Show resolved Hide resolved
update(options: Partial<StripeAddressElementOptions>): StripeAddressElement;
};

export interface ContactOption {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: should we wait until API review has been gaveled for GA to release this? What is the significance of adding Option to the name instead of just Contact?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good question! I think it should be fine for us to add it now since we want beta users to test it out without running into type error and the whole AE is marked as "beta access" only. I was following the convention we have to append a option after the type name, such as FieldOption.

cyuen-stripe
cyuen-stripe previously approved these changes Sep 21, 2022
Copy link
Contributor

@cyuen-stripe cyuen-stripe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left one more nit, but otherwise looks good to me, thank you for adding this!

types/stripe-js/elements/address.d.ts Show resolved Hide resolved
@graceg-stripe graceg-stripe merged commit dea611e into master Sep 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants