mirror of
https://github.com/documentationjs/documentation.git
synced 2026-01-18 14:17:30 +00:00
115 lines
2.5 KiB
JSON
115 lines
2.5 KiB
JSON
[
|
|
{
|
|
"description": "This function returns the number plus two.",
|
|
"tags": [
|
|
{
|
|
"title": "param",
|
|
"description": "the number",
|
|
"lineNumber": 3,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Number"
|
|
},
|
|
"name": "a"
|
|
},
|
|
{
|
|
"title": "returns",
|
|
"description": "numbertwo",
|
|
"lineNumber": 4,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Number"
|
|
}
|
|
},
|
|
{
|
|
"title": "throws",
|
|
"description": "if number is 3",
|
|
"lineNumber": 5,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Error"
|
|
}
|
|
},
|
|
{
|
|
"title": "example",
|
|
"description": "var result = returnTwo(4);\n// result is 6",
|
|
"lineNumber": 6
|
|
}
|
|
],
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 10,
|
|
"column": 3
|
|
}
|
|
},
|
|
"context": {
|
|
"loc": {
|
|
"start": {
|
|
"line": 11,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 15,
|
|
"column": 1
|
|
}
|
|
},
|
|
"code": "/**\n * This function returns the number plus two.\n *\n * @param {Number} a the number\n * @returns {Number} numbertwo\n * @throws {Error} if number is 3\n * @example\n * var result = returnTwo(4);\n * // result is 6\n */\nfunction returnTwo(a) {\n if (a === 3) throw new Error('cannot be 3');\n // this returns a + 2\n return a + 2;\n}\n"
|
|
},
|
|
"errors": [
|
|
{
|
|
"message": "type Number found, number is standard",
|
|
"commentLineNumber": 3
|
|
}
|
|
],
|
|
"params": [
|
|
{
|
|
"title": "param",
|
|
"description": "the number",
|
|
"lineNumber": 3,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Number"
|
|
},
|
|
"name": "a"
|
|
}
|
|
],
|
|
"returns": [
|
|
{
|
|
"title": "returns",
|
|
"description": "numbertwo",
|
|
"lineNumber": 4,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Number"
|
|
}
|
|
}
|
|
],
|
|
"throws": [
|
|
{
|
|
"title": "throws",
|
|
"description": "if number is 3",
|
|
"lineNumber": 5,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Error"
|
|
}
|
|
}
|
|
],
|
|
"examples": [
|
|
"var result = returnTwo(4);\n// result is 6"
|
|
],
|
|
"name": "returnTwo",
|
|
"kind": "function",
|
|
"members": {
|
|
"instance": [],
|
|
"static": []
|
|
},
|
|
"path": [
|
|
"returnTwo"
|
|
]
|
|
}
|
|
] |