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

The expression of an export assignment must be an identifier or qualified name in an ambient context. #40

Closed ardyfeb closed 4 years ago

ardyfeb commented 4 years ago

According https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#arbitrary-expressions-are-forbidden-in-export-assignments-in-ambient-contexts exporting ambient contexts are forbidden

exportig definition should be:

class Xendit {
    ...
}

export = Xendit

instead export directly:

export = class Xendit {
  ...
}

so we must refactoring https://github.com/xendit/xendit-node/blob/master/src/xendit.d.ts and related files

stanleynguyen commented 4 years ago

@ardyfeb I wonder if it's a problem though 🤔 because we have already given an identifier Xendit to the class, just exporting with shorthand instead of exporting on a separate line. Would really appreciate it if you can provide a code example for bug reproduction 😄

huben92 commented 4 years ago

it is a problem, we need to downgrade typescript to below 2.6 if want to use xendit-node on our project. Please fix it.

stanleynguyen commented 4 years ago

Hey @huben92 would you like to take this up and get it fixed immediately?

huben92 commented 4 years ago

Yes, sure