Skip to content

Commit a2bf538

Browse files
author
piersh
committed
add developer docs re: constant-typed parameters
1 parent 5d5ddb0 commit a2bf538

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

developer_docs/inline_documentation.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,13 @@ If the parameter is optional, add square brackets around the name:
6868
@param {type} [name] Description here.
6969
```
7070

71+
If the parameter takes one or more values defined in `constants.js`,
72+
then the type should be specified as `{Constant}` and the valid values should be enumerated in the comment following the `either` keyword, eg:
73+
74+
```
75+
@param {Constant} horizAlign horizontal alignment, either LEFT, CENTER, or RIGHT
76+
```
77+
7178
## Specify return type
7279

7380
The `@return` is identical to `@params`, but without the name. It should be the last element in `@method`. The JS types are: String, Number, Boolean, Object, Array, Null, and Undefined. If there is no return type, do not include `@return`.

0 commit comments

Comments
 (0)