xendit-node icon indicating copy to clipboard operation
xendit-node copied to clipboard

Error on TypeScript v4

Open cauldyclark15 opened this issue 4 years ago • 4 comments

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.

cauldyclark15 avatar Jul 27 '21 02:07 cauldyclark15

Similar to issue #40

stanleynguyen avatar Jul 27 '21 11:07 stanleynguyen

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

stanleynguyen avatar Jul 27 '21 11:07 stanleynguyen

solved by silencing the TS lib check on tsconfig.json

"skipLibCheck": true

closing this one

cauldyclark15 avatar Jul 27 '21 12:07 cauldyclark15

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

stanleynguyen avatar Jul 27 '21 15:07 stanleynguyen