I am just curious and trying to understand some of the syntax in the statement…
var midiInput = deviceDriver.mPorts.makeMidiInput()
in the API Reference, it says:
- makeMidiInput(name : string) : DeviceMidiInput
Obviously, the name argument is optional but I have two questions.
First, is there anyway that the API Reference indicates that the argument is optional?
“name” looks to be in bold whereas other arguments seem mostly in normal weight text but I am not sure… It seems some conventions use square brackets [ … ] to indicate optional arguments.
Second, what is the purpose of supplying the “name” string? The returned object doesn’t have a name property or any apparent way to access it. Perhaps you can refer to it by “name” in some way I am not aware of. It isn’t really important, I know, but I am just curious.
JL