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 CheckoutResponse interfaces #23

Merged
merged 2 commits into from
Mar 2, 2025
Merged

Add CheckoutResponse interfaces #23

merged 2 commits into from
Mar 2, 2025

Conversation

stevehenty
Copy link
Contributor

This PR adds the CheckoutResponse interfaces.

@stevehenty stevehenty requested a review from swashata December 4, 2024 15:49
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please revert the changes. They are redundant, because we aren't really using those parameters.

CleanShot 2024-12-05 at 17 17 33@2x

src/demo.ts Outdated
@@ -65,13 +66,13 @@ document.addEventListener('DOMContentLoaded', () => {
cancel() {
log('cancel');
},
purchaseCompleted(data) {
purchaseCompleted(data: CheckoutResponse | null) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since you've already properly added the type to the main interface, TypeScript now properly infers it and that's the DX we want indeed.

CleanShot 2024-12-05 at 17 18 17@2x

CleanShot 2024-12-05 at 17 19 10@2x

So I would suggest to rever these changes too.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice

@stevehenty stevehenty requested a review from swashata December 5, 2024 17:19

Verified

This commit was signed with the committer’s verified signature.
This is a combination of 3 commits.

Add CheckoutResponse types

Revert changes

Revert
@swashata swashata force-pushed the add-response-types branch from c862e43 to d5e8000 Compare March 2, 2025 12:53
@swashata swashata merged commit e3af3cb into develop Mar 2, 2025
3 checks passed
@swashata swashata deleted the add-response-types branch March 2, 2025 14:09
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