Closed gorshkovaea closed 1 month ago
Hi @gorshkovaea, Thank you for raising this issue. It appears that we have missed to include the type definition for this function.
I will update it shortly.
Hi @gorshkovaea,
I have released a new version with the type definition for updateCheckout
function.
Please update to the latest version (1.1.1
)
Thank you.
thank you!
What happened?
I attempted to update a checkout form with new items and reset a discount using the following code
paddle.Checkout.updateCheckout({ discountId: null, items: [{ priceId: 'newPriceId', quantity: 1 }], });
However, I encountered a TypeScript error stating "Property updateCheckout does not exist on type". Nonetheless, there is a documentation for this method here, and also I was able to use it successfully by casting to 'any' as follows:(paddle.Checkout as any).updateCheckout({ discountId: null, items: [{ priceId: 'newPriceId', quantity: 1 }], });
.Why can't I reach updateCheckout in my ts code without an error?
Steps to reproduce
What did you expect to happen?
paddle.Checkout.updateCheckout() works well without any errors
How are you integrating?
React, TypeScript
Logs
No response