Welcome GuestLogin

@arguments token

RSS
Modified on Thursday, 10 December 2009 12:25 by Administrator Categorized as Uncategorized
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

  1. The expected type of each variable argument, surrounded with curly braces. Required.
       (Alphanumeric characters including '.' and '$' until the first space).
  2. 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)).
  3. The summary of the variable arguments section. Optional.
       (Any characters until the end of the line)
  4. 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

ScrewTurn Wiki version 3.0.4.560. Some of the icons created by FamFamFam.