djipco / webmidi

Tame the Web MIDI API. Send and receive MIDI messages with ease. Control instruments with user-friendly functions (playNote, sendPitchBend, etc.). React to MIDI input with simple event listeners (noteon, pitchbend, controlchange, etc.).
Apache License 2.0
1.53k stars 115 forks source link

Fix types for two methods #289

Closed disambiguator closed 2 years ago

disambiguator commented 2 years ago

getInputById and getOutputById can both return undefined if not found. This is already noted in the docs, but the types are wrong.

djipco commented 2 years ago

Thanks!