Skip to content

Commit ff6192d

Browse files
committed
Update tag/param.js documentation
1 parent 9c7c5fd commit ff6192d

File tree

1 file changed

+29
-28
lines changed

1 file changed

+29
-28
lines changed

tags/param.js

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -30,77 +30,78 @@ var tnd = require("bit-docs-type-annotate").typeNameDescription;
3030
params.push(param);
3131
}
3232
};
33+
3334
/**
3435
* @module {Object} bit-docs-js/tags/param @param
3536
* @parent bit-docs-js/tags
3637
*
37-
* Adds parameter information to a [bit-docs-js/tags/function @function] or
38-
* [bit-docs-js/tags/signature @signature].
38+
* Specifies parameter information for [bit-docs-js/tags/function] or
39+
* [bit-docs-js/tags/signature].
40+
*
41+
* A "parameter" is a method definition variable, like `a` in `function(a)`.
3942
*
4043
* @signature `@param {TYPE} NAME [DESCRIPTION]`
41-
* Example:
44+
*
4245
* @codestart javascript
4346
* /**
4447
* * Finds an order by id.
45-
* * @@param {String} [id=0] Order identification number.
46-
* * @@param {function(Order)} [success(order)] Filter
47-
* * order search by this date.
48+
* * @param {String} [id=0] Order identification number.
49+
* * @param {function(Order)} [success(order)] Callback function.
4850
* *|
49-
* findById: function( id, success ) {
50-
* @codeend
51+
* findById: function( id, success ) {
52+
* @codeend
5153
*
52-
* Use `@param` within a [bit-docs-js/tags/function @function] comment block or after
53-
* a [bit-docs-js/tags/signature @signature] tag.
54+
* Use `@param` within a [bit-docs-js/tags/function] comment block, or after
55+
* an [bit-docs-js/tags/signature] tag.
5456
*
5557
* @param {bit-docs-js/typeExpression} TYPE A [bit-docs-js/typeExpression type expression].
5658
*
57-
* Use [bit-docs-js/tags/option @option] to detail a function's arguments or an
58-
* object's properties.
59+
* Use [bit-docs-js/tags/option @option] to describe a function's arguments,
60+
* or an object's properties.
5961
*
6062
* @param {bit-docs-js/nameExpression} NAME A [bit-docs-js/nameExpression name expression].
6163
*
6264
* @body
6365
*
64-
* ## @param within a function comment
66+
* ## Use within a comment block
6567
*
66-
* If using a comment preceeds a function like ...
68+
* If the comment block precedes a function declaration, like:
6769
*
6870
* @codestart javascript
6971
* /**
7072
* * Finds an order by id.
71-
* * @@param {String} [id=0] Order identification number.
72-
* * @@param {function(Order)} [success(order)] Filter order search by this date.
73+
* * @param {String} [id=0] Order identification number.
74+
* * @param {function(Order)} [success(order)] Filter order search by this.
7375
* *|
74-
* findById: function( id, success ) {
75-
* @codeend
76+
* findById: function( id, success ) {
77+
* @codeend
7678
*
77-
* ... bit-docs will automatically
78-
* make the comment's [bit-docs-js/DocObject DocObject] type a function
79-
* and create params with just names (in this case `id` and `success`).
79+
* Then bit-docs will automatically set the type to function for the
80+
* [bit-docs-js/DocObject] representing that comment, and create params with
81+
* names only (in this case `id` and `success`, and no description).
8082
*
81-
* The comment's `@param`s tags should use the same names as the function. Any
82-
* params that specifies a name that isn't present is added at the end of
83+
* The comment's `@param`s tags should use the same names as the function.
84+
* Any param that specifies a name that isn't present is added at the end of
8385
* the arguments.
8486
*
85-
* ## @param within a signature
87+
* ## Use after @signature
8688
*
87-
* Use `@param` to specify the params in a signature.
89+
* Use `@param` to specify the parameter variables of a signature.
8890
*
8991
* @codestart javascript
9092
* /**
9193
* * Finds an order by id.
9294
* *
9395
* * @signature `Order.findById(id=0,[success])`
9496
* *
95-
* * @@param {String} [id=0] Order identification number.
96-
* * @@param {function(Order)} [success(order)] Filter order search by this date.
97+
* * @param {String} [id=0] Order identification number.
98+
* * @param {function(Order)} [success(order)] Callback function.
9799
* *|
98100
* findById: function( id, success ) {
99101
* @codeend
100102
*
101103
* When a `@signature` is used, any params automatically created from code
102104
* are overwritten.
103-
*
104105
*/
105106
module.exports = {
106107

0 commit comments

Comments
 (0)