swellstores / swell-js

JS library for building storefronts and checkouts with Swell ecommerce.
https://swell.is
MIT License
138 stars 29 forks source link

types missing in latest version #93

Closed BelphegorPrime closed 1 month ago

BelphegorPrime commented 1 year ago

Hi, there are some type definitions, in the currenty released version, mssing.

I tried to upgrade from 3.18.2 to 3.20.1

the type definition for InputPayment here https://github.com/swellstores/swell-js/blob/75de0f8a2bf48cbed5acf8bb53baf89c5dd0194c/types/payment/index.d.ts#L41 is undefined.

also InputPaymentElementApple and InputPaymentRedirect are not exported here https://github.com/swellstores/swell-js/blob/75de0f8a2bf48cbed5acf8bb53baf89c5dd0194c/types/index.d.ts#L32 from the payments definition, because they aren't defined.

Without that the library is not useable.

BelphegorPrime commented 1 year ago

looks like there are some problems with the type definition in payment/index.d.ts

For example the interface InputPaymentElementCard is defined twice it was written by @vstudenichnik-insoft and @mustafaswell

mustafaswell commented 1 year ago

Thanks for the ping @BelphegorPrime. I'll take a look!

gusfune commented 1 year ago

This was also reported on #81 which still have a bunch of open issues on types.

mustafaswell commented 1 year ago

Thank you @BelphegorPrime and @gusfune for reporting. The latest release of Swell-JS contains the patches you had mentioned. Please continue to let us know should you find any gaps!