Can functions be overloaded in the same way properties can? I'm interested in overloading properties to have separate documentation for different types passed to them.
Currently, both values are set to the same value but I need distinct JSDoc for different data types.
interface Example {
/** When a string is passed "x" will happen. */
prop: string;
/** When a number is passed "y" will add something. */
prop: number;
}
However, I encounter a Duplicate identifier error when attempting this.
Duplicate identifier 'prop'.