Skip to content

Commit c370e73

Browse files
committed
Update tag/option.js documentation
1 parent fa17b49 commit c370e73

File tree

1 file changed

+34
-36
lines changed

1 file changed

+34
-36
lines changed

tags/option.js

Lines changed: 34 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -52,60 +52,58 @@ var tnd = require("bit-docs-type-annotate").typeNameDescription;
5252

5353

5454
/**
55-
* @constructor documentjs.tags.option @option
55+
* @module bit-docs-js/tags/option @option
5656
* @tag documentation
57-
* @parent documentjs.tags
58-
*
59-
* Details the properties of an object or the arguments of a function
60-
* in a [documentjs.tags.param] tag.
61-
*
62-
* @signature `@option {TYPE} NAME [DESCRIPTION]`
57+
* @parent bit-docs-js/tags
6358
*
59+
* Describes a property or argument of the object or function specified in
60+
* an [bit-docs-js/tags/param] tag.
61+
*
62+
* @@signature `@option {TYPE} NAME [DESCRIPTION]`
63+
*
6464
* @codestart javascript
65-
* /**
66-
* * Retrieves a list of orders.
67-
* *
68-
* * @@param {{}} params A parameter object with the following options:
69-
* * @@option {String} type Specifies the type of order.
70-
* * @@option {Number} [createdAt] Retrieves all orders after this
71-
* * timestamp.
72-
* *
73-
* * @@param {function(Orders.List)} [success(orders)] Filter order search
74-
* * by this date.
75-
* * @@option orders A list of [Orders] that match `params`.
76-
* *|
77-
* find: function( params, success ) {
78-
* @codeend
65+
* /**
66+
* * Retrieves a list of orders.
67+
* *
68+
* * @param {{}} params A parameter object with the following options:
69+
* * @option {String} type Specifies the type of order.
70+
* * @option {Number} [createdAt] Retrieves orders after this timestamp.
71+
* *
72+
* * @param {function(Orders.List)} [success(orders)] Callback function.
73+
* * @option orders A list of [Orders] that match `params`.
74+
* *|
75+
* find: function( params, success ) {
76+
* @codeend
7977
*
8078
*
81-
* @param {documentjs.typeExpression} [TYPE] A [documentjs.typeExpression type expression]. Examples:
79+
* @param {bit-docs/typeExpression} [TYPE] A [bit-docs/typeExpression type expression]. Examples:
8280
*
8381
* `{String}` - type is a `String`.
8482
* `{function(name)}` - type is a `function` that takes one `name` argument.
8583
*
86-
* `TYPE` does not need to be specified for types that are already described in
87-
* the option's corresponding function or object. For example:
88-
*
84+
* `TYPE` does not need to be specified for types that are already described
85+
* in the `@option`'s corresponding function or object.
86+
*
87+
* For example, notice how there is no need to specify `{String}`:
8988
*
9089
* @codestart
91-
* /**
92-
* * @@param {{type: String}} params A parameter object
93-
* * with the following options:
94-
* * @@option type Specifies the type of order.
95-
* *
96-
* * @@param {function(Orders.List)} [success(orders)] Callback
97-
* * function.
98-
* * @@option orders A list of [Orders] that match `params`.
99-
* *|
90+
* /**
91+
* * @param {{type: String}} params An object with the following options:
92+
* * @option type Specifies the type of order.
93+
* * @option label Retrieves only orders with this label.
94+
* *|
10095
* @codeend
101-
* @param {documentjs.nameExpression} NAME A [documentjs.nameExpression name expression]. Examples:
96+
*
97+
*
98+
* @param {bit-docs/nameExpression} NAME
99+
* A [bit-docs/nameExpression name expression]. Examples:
102100
*
103101
* `age` - age is item.
104102
* `[age]` - age is item, age is optional.
105103
* `[age=0]` - age defaults to 0.
106104
*
105+
*
107106
* @param {Markdown} [DESCRIPTION] Markdown content that continues for multiple lines.
108-
*
109107
*/
110108
module.exports = {
111109

0 commit comments

Comments
 (0)