@@ -30,77 +30,78 @@ var tnd = require("bit-docs-type-annotate").typeNameDescription;
30
30
params . push ( param ) ;
31
31
}
32
32
} ;
33
+
33
34
/**
34
35
* @module {Object} bit-docs-js/tags/param @param
35
36
* @parent bit-docs-js/tags
36
37
*
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)`.
39
42
*
40
43
* @signature `@param {TYPE} NAME [DESCRIPTION]`
41
- * Example:
44
+ *
42
45
* @codestart javascript
43
46
* /**
44
47
* * 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.
48
50
* *|
49
- * findById: function( id, success ) {
50
- * @codeend
51
+ * findById: function( id, success ) {
52
+ * @codeend
51
53
*
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.
54
56
*
55
57
* @param {bit-docs-js/typeExpression } TYPE A [bit-docs-js/typeExpression type expression].
56
58
*
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.
59
61
*
60
62
* @param {bit-docs-js/nameExpression } NAME A [bit-docs-js/nameExpression name expression].
61
63
*
62
64
* @body
63
65
*
64
- * ## @param within a function comment
66
+ * ## Use within a comment block
65
67
*
66
- * If using a comment preceeds a function like ...
68
+ * If the comment block precedes a function declaration, like:
67
69
*
68
70
* @codestart javascript
69
71
* /**
70
72
* * 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.
73
75
* *|
74
- * findById: function( id, success ) {
75
- * @codeend
76
+ * findById: function( id, success ) {
77
+ * @codeend
76
78
*
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 ).
80
82
*
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
83
85
* the arguments.
84
86
*
85
- * ## @param within a signature
87
+ * ## Use after @ signature
86
88
*
87
- * Use `@param` to specify the params in a signature.
89
+ * Use `@param` to specify the parameter variables of a signature.
88
90
*
89
91
* @codestart javascript
90
92
* /**
91
93
* * Finds an order by id.
92
94
* *
93
95
* * @signature `Order.findById(id=0,[success])`
94
96
* *
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 .
97
99
* *|
98
100
* findById: function( id, success ) {
99
101
* @codeend
100
102
*
101
103
* When a `@signature` is used, any params automatically created from code
102
104
* are overwritten.
103
- *
104
105
*/
105
106
module . exports = {
106
107
0 commit comments