Documents variable number of function parameters.
Example
/**
* Gets an array with specified elements inserted at the beginning.
* @arguments {Object} [0-n] Elements to insert at the start of the Array. Optional.
*/
Array.prototype.unshift = function ()
Description
This token documents variable number of function parameters. In common implementations of ECMAScript, functions can operate on variable numbers of arguments, by exposing the arguments that were passed through a built-in object
arguments
. This token allows documenting this. The token consists of four parts:
@arguments {type} [range] summary
description
- The expected type of each variable argument, surrounded with curly braces. Required.
(Alphanumeric characters including '.' and '$' until the first space). - The range of the argument (zero based index from which variable arguments begin), surrounded with square brackets. Required.
(Alphanumeric characters including '-'. This will typically be something like '0-n' (from zero until the count of arguments passed)). - The summary of the variable arguments section. Optional.
(Any characters until the end of the line) - The description of the variable arguments section. Optional.
(Any characters from the start of the second line until the next token or until the end of the comment).
The three parts are separated by space.
See also
All tokens
@param
@returns
@type