Closed glend1 closed 2 years ago
I though this might have been a typescript error that would have magically got solved with the rest of the issues but it hasn't.
here is my code, this appears to be a typescript issue again;
WebMidi.inputs.forEach(e => { e.removeListener() })
VSCode is telling me Expected 2-3 arguments, but got 0
Expected 2-3 arguments, but got 0
I have created a new file, in my project, since that has been a point of contention before and;
import { WebMidi } from 'webmidi' WebMidi.inputs[0].removeListener() WebMidi.inputs[0].removeListener("noteon") WebMidi.inputs[0].removeListener("noteon", (e) => { console.log(e)}) //doesn't give the error
This appears to not match the documentation, I don't know if the documentation is wrong or the code. Can you take a look at whats happening here?
EDIT: the code works but isn't validating with typescript. so its a typescript error.
You are right. There was an error in the .d.ts file with regards to removeListener(). It has been fixed in v3.0.13. Once again, thanks for reporting.
.d.ts
removeListener()
I though this might have been a typescript error that would have magically got solved with the rest of the issues but it hasn't.
here is my code, this appears to be a typescript issue again;
VSCode is telling me
Expected 2-3 arguments, but got 0
I have created a new file, in my project, since that has been a point of contention before and;
This appears to not match the documentation, I don't know if the documentation is wrong or the code. Can you take a look at whats happening here?
EDIT: the code works but isn't validating with typescript. so its a typescript error.