Julusian / node-midi

A node.js wrapper for RtMidi providing MIDI I/O
https://www.npmjs.com/package/@julusian/midi
MIT License
22 stars 7 forks source link

fix: change imports of EventEmitter in type def #9

Closed ArTiSTiX closed 1 year ago

ArTiSTiX commented 1 year ago

When trying to use node-midi with Typescript, i encountered this error:

release/app/node_modules/@julusian/midi/midi.d.ts:13:28 - error TS2507: Type 'typeof EventEmitter' is not a constructor function type.

13 export class Input extends EventEmitter {
                              ~~~~~~~~~~~~

Found 1 error in release/app/node_modules/@julusian/midi/midi.d.ts:13

After some search, i found out imports in type def file are not compatible with latest node types. I am using @types/node v18.16.0.

Edit: not prio, i added skipLibCheck in my tsconfig, i originally thought node-midi was the reason why my tests failed, but in fact, i have no idea why, and it's not related to this package