Open
Description
The recipes doc illustrates how to document a method that is an overloaded getter/setter depending on parameters. But the following code produces what I believe to be wrong output:
class RTLSDR extends EventEmitter {
// ...
/**
* Get the device's crystal frequencies.
* @return {XtalFreqs} - current crystal frequencies
* @throws {Error} the device is closed
*/
/**
* Set the device's crystal frequency(ies).
* @param {number} rtlFreq - the crystal frequency to set on the RTL device
* @param {number} [tunerFreq=rtlFreq] - the crystal frequency to set on the tuner, if different
* @return {this}
* @throws {Error} the device is closed
*/
xtalFreq(rtlFreq, tunerFreq) {
this.assertOpen();
if (rtlFreq) {
librtlsdr.set_xtal_freq(this.device, rtlFreq, tunerFreq || rtlFreq);
return this;
}
return librtlsdr.get_xtal_freq(this.device);
}
// ...
} // end of class
This produces two signatures in the HTML output (which is correct) but the "get" signature is not what I want:
Get the device's crystal frequency(ies).
xtalFreq(rtlFreq: any, tunerFreq: any): XtalFreqsSet the device's crystal frequency(ies).
xtalFreq(rtlFreq: number, tunerFreq: [number]): this
I believe the "get" output should be:
Get the device's crystal frequency(ies).
xtalFreq(): XtalFreqs