PaddleHQ / paddle-js-wrapper

Wrapper to load Paddle.js as a module and use TypeScript definitions when working with methods.
Apache License 2.0
44 stars 6 forks source link

[Bug]: Typescript types do not support "saved_payment_methods" #78

Open ferenckv opened 1 week ago

ferenckv commented 1 week ago

What happened?

Typescript types do not include typings to show saved payment methods in the checkout. Setting a customerAuthToken do not fails but only because its treated by typescript as an "extra" property but it's not included in the definition.

See 1 & 2

Steps to reproduce

  1. Setup paddle-js using https://www.npmjs.com/package/@paddle/paddle-js
  2. Add customerAuthToken to checkout.open. Typescript does not complain. If you run it, it works.
  3. Add allowedPaymentMethods: ["saved_payment_methods"] to checkout or global settings. Typescript complains. ...

What did you expect to happen?

Types to be up to date to paddle-js implementation.

How are you integrating?

React

Logs

No response