TooTallNate / node-speaker

Output PCM audio data to the speakers
655 stars 147 forks source link

Typescript export errors #142

Closed SoTrxII closed 4 years ago

SoTrxII commented 4 years ago

Hi there, I've got some errors trying to build a project after including node-speaker as a dependency. image

These can be resolved by using "export" on both the Speaker class and namespace, and by removing the exports = Speaker at the end of the index.d.ts file.

I've tested with Typescript 3.6.5 and 3.7.5 so far, on two separate projects.

As I'm not yet 100% sure this has nothing to do with my current TS config, I've not uploaded any PR yet.

89netraM commented 4 years ago

I also encountered this problem, but I "solved" it by changing the last line to export = Speaker. I thought this made more sense since index.js exports Speaker as a default.

TooTallNate commented 4 years ago

Fixed in v0.5.2.

cjheath commented 4 years ago

I still have this problem in v0.5.2. PR sent. Please fix this one way or another :)