xendit / xendit-node

Xendit REST API Client for Node.js - Card, Virtual Account, Invoice, Disbursement, Recurring Payments, Payout, EWallet, Balance, Retail Outlets, QR Codes, Direct Debit
https://developers.xendit.co/api-reference/
115 stars 63 forks source link

Error on TypeScript v4 #102

Open cauldyclark15 opened 3 years ago

cauldyclark15 commented 3 years ago
not allowed in ambient contexts.

12   createFixedVA = createFixedVA;
                     ~~~~~~~~~~~~~

node_modules/xendit-node/src/va/va.d.ts:13:16 - error TS1039: Initializers are not allowed in ambient contexts.

13   getFixedVA = getFixedVA;
                  ~~~~~~~~~~

node_modules/xendit-node/src/va/va.d.ts:14:19 - error TS1039: Initializers are not allowed in ambient contexts.

14   updateFixedVA = updateFixedVA;
                     ~~~~~~~~~~~~~

node_modules/xendit-node/src/va/va.d.ts:15:18 - error TS1039: Initializers are not allowed in ambient contexts.

15   getVAPayment = getVAPayment;
                    ~~~~~~~~~~~~

[10:09:31 AM] Found 52 errors. Watching for file changes.
stanleynguyen commented 3 years ago

Similar to issue #40

stanleynguyen commented 3 years ago

Probably changing assignment to just type declaration (e.g. updateFixedVA = updateFixedVA to updateFixedVA typeof updateFixedVA) would work

cauldyclark15 commented 3 years ago

solved by silencing the TS lib check on tsconfig.json

"skipLibCheck": true

closing this one

stanleynguyen commented 3 years ago

solved by silencing the TS lib check on tsconfig.json

"skipLibCheck": true

closing this one

Hey @cauldyclark15, glad that you've managed to suppress those errors. However, I would consider this a workaround rather than a proper fix so reopening the issue