ButterCMS / buttercms-js

Node/JS API client for ButterCMS (https://buttercms.com)
Other
162 stars 33 forks source link

Typescript build error in butter.d.ts #16

Closed Jacob-Bass closed 5 years ago

Jacob-Bass commented 5 years ago

butter.d.ts is throwing an error when I try to build my project using typescript.

declare module "buttercms" {

  export = Butter;  <-- This line throwing error

}

Error: "Exports and export assignments are not permitted in module augmentations."

jakelumetta commented 5 years ago

Thanks @Jacob-Bass - will take a look at this.

jakelumetta commented 5 years ago

@jkelin Can you confirm you run into the same issue when using typescript? I believe this line may be causing some issues: https://github.com/ButterCMS/buttercms-js/commit/e470ba875d2416c5a8d7b36bce4c5d0de5fe60a5#diff-7af3c5bb3871283c4aedd61de987d242R1

jkelin commented 5 years ago

My apologies. I can confirm that this has been triggered by my change. I am not sure how this could have slipped through my initial testing.

jakelumetta commented 5 years ago

Thanks @jkelin ! @Jacob-Bass we've deployed this updated version. Can you confirm it fixes your issue?