-
Notifications
You must be signed in to change notification settings - Fork 184
[breaking] Update types for Checkout SDK #803
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
[breaking] Update types for Checkout SDK #803
Conversation
dbd131f to
c1425a5
Compare
c1425a5 to
4fa8512
Compare
| * Contact [Stripe support](https://support.stripe.com/) for more information. | ||
| */ | ||
| initCheckout(options: StripeCheckoutOptions): Promise<StripeCheckout>; | ||
| initCheckout(options: StripeCheckoutOptions): StripeCheckout; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While we're here, can we remove the beta access notice 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed 0718c41
|
|
||
| export interface StripeCheckout { | ||
| /* Custom Checkout methods */ | ||
| type LoadActionsError = {message: string; code: null}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should code be code: string | null?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I think the idea is to be explicit about the error.code here.
Similar to other
stripe-js/types/stripe-js/checkout.d.ts
Lines 534 to 536 in 0718c41
| type UpdateTaxIdInfoError = | |
| | {message: string; code: 'invalidTaxId'} | |
| | AnyBuyerError; |
Right now, we don't have a concrete code and only has null
We can add specific ones when we introduce them in the future.
Summary & motivation
Update types for Checkout SDK.
Testing & documentation
API Review: Custom Checkout init parallelization
API Review: Custom Checkout improvements (react-stripe-js, clientSecret promise)