You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use Xendit in my NodeJS and using TypeScript.
I tried to call EWallet.createEWalletCharge(args: {}) and QrCode.createCode(args: {}) and get TypeError: Cannot read properties of undefined to all parameters that use your enum. (in my case Currency, ChannelCode, QrCodeTypes)
I think because the enum is not convert properly to be string in the javascript code (🤔 just my opinion, still not sure because haven't check it deeper).
I think despite of using enum, better for you to use Union Type and the we still can get the value suggestion too like the image I put below.
Hi @djmanaluu a little bit of a late response but we are trying to figure out the best way to fix this at the moment. In the meantime, please use the unideal way of casting strings as any fit into the type temporarily 🙏
I use Xendit in my NodeJS and using TypeScript.
I tried to call
EWallet.createEWalletCharge(args: {})
andQrCode.createCode(args: {})
and getTypeError: Cannot read properties of undefined
to all parameters that use your enum. (in my caseCurrency
,ChannelCode
,QrCodeTypes
)I think because the enum is not convert properly to be string in the javascript code (🤔 just my opinion, still not sure because haven't check it deeper).
I think despite of using enum, better for you to use Union Type and the we still can get the value suggestion too like the image I put below.
So here's the example:
Maybe you can change all enum into union type like that.
And I found 1 more problem,
ChannelCode
inewallet_charge.d.ts
not cover all of the ewallet method.Thank you.
NOTE:
Just run this code
The text was updated successfully, but these errors were encountered: