JSDoc. How to declare different types of arguments for one function?

Hello.
How to tell the parser that a method takes completely different arguments, for example:
string, string, string, string
string, string, object
object, string, string
object
array

To declare only one set of arguments makes no sense, because this method, although doing the same thing, but takes different arguments are completely equivalent, bringing them in early to the common view (e.g. array).
October 3rd 19 at 04:05
3 answers
October 3rd 19 at 04:07
Solution
Answer itself. You need to watch the tag @variation. It adds methods with the same names in the documentation. In order to avoid duplication of header, I have to pick a template, and this will do for recreation (according to the logic of the template, it's not that hard).
October 3rd 19 at 04:09
Here there are shown two solutions. The second seems to be nice:
/**
 @name init
@function
 @param {string} key
 @param {mixed} value
*/
/**
 @name init^2
@function
 @param {object} keyValues
*/
var init = function() {
 ...
But I have not tested.
He just created a partition with the method init^2. - Jess.Haley commented on October 3rd 19 at 04:12
October 3rd 19 at 04:11
/**
 @param {String|Object|Array} v1
 @param {String|Object} [v2]
 @param {String} [v3]
 @param {String} [v4]
*/

But I think you need it.
Not this. This record will be confused. Ideally, I would like to do so:
Title
General description

Description
Table with arguments
Example

Description
Table with arguments
Example

Description
Table with arguments
Example - Jess.Haley commented on October 3rd 19 at 04:14

Find more questions by tags JavaScript