fix: Input/Output Polymorphism
This is a pseudo code to illustrate the concept. I'm not very good with JSDoc these days. I personally find it easier just to work with typescript so TSC and VS code do all the heavy lifting to generate my types.
This implementation refactors Input and Output with a base class of Port.
applies to #229
Thanks a lot for your work on this. However, before I can merge it, the documentation needs to be carefully reviewed. The auto-generated documentation on the website relies on jsdoc being correct. From casual perusal, I can see that the Port object's documentation has probably been copied over from the Input object and carries over several references that are no longer valid.
Unfortunately, I do not have time right now to do this myself.
Thanks so much for your work on this. However, a quick search still reveals many references to Input in the documentation for Port.
done
Again, thanks for your work on this. However, there is still a part that is missing: the unit tests. As far as I know, this library has been pretty stable and I do not want to introduce any forms of regression.
So, we would need a new test file in /test for the Port object and the Input and Output tests may need to be adjusted.
Cool. Probably beyond my availability for additional work on this issue. We're actually moving away from WebMidi.js to just use the Wed MIDI API directly in our use cases. Thanks for entertaining it. Feel free to wrap it up if you're interested or close it if you're not.
I dont' really have time to work on this currently. I'll leave it open and, hopefully, I can fin some time. If someone else wants to take a stab at updating the tests, that would be awesome.