documentation/test/fixture/multiexample.output.json
Tom MacWright 3da1ff6dd0 Source-sorting by default (#410)
* Source-sorting by default

Many changes

* Uses a new version of module-deps that exposes a sort key
  we use to sort documentation.
* Adds inference for methods in objects
* Groups events into a separate comment property

* Add jsdoc property. Refs https://github.com/documentationjs/documentation/pull/388#issuecomment-215791547

* Namespaces and paths

* More powerful paths: paths now include name, kind, and scope
* comments now include a 'namespace' property with a formatted namespace

* Fix tests

* Re-ignore fonts

* Nix sourceKey from output

* Pin dependency versions

* Fix module-deps-sortable ref

* Update tests for right deps
2016-04-29 18:09:52 -04:00

348 lines
7.9 KiB
JSON

[
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "This function returns the number one.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 38,
"offset": 37
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 38,
"offset": 37
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 38,
"offset": 37
}
}
},
"tags": [
{
"title": "returns",
"description": "numberone",
"lineNumber": 2,
"type": {
"type": "NameExpression",
"name": "Number"
}
},
{
"title": "example",
"description": "foo(1);",
"lineNumber": 3
},
{
"title": "example",
"description": "foo(2);",
"lineNumber": 5
},
{
"title": "throws",
"description": "if you give it something",
"lineNumber": 7,
"type": {
"type": "NameExpression",
"name": "Error"
}
},
{
"title": "throws",
"description": "if you give it something else",
"lineNumber": 8,
"type": {
"type": "NameExpression",
"name": "TypeError"
}
},
{
"title": "augments",
"description": null,
"lineNumber": 9,
"type": null,
"name": "Foo"
},
{
"title": "augments",
"description": null,
"lineNumber": 10,
"type": null,
"name": "Bar"
}
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 12,
"column": 3
}
},
"context": {
"loc": {
"start": {
"line": 13,
"column": 0
},
"end": {
"line": 16,
"column": 2
}
},
"code": "/**\n * This function returns the number one.\n * @returns {Number} numberone\n * @example\n * foo(1);\n * @example\n * foo(2);\n * @throws {Error} if you give it something\n * @throws {TypeError} if you give it something else\n * @augments Foo\n * @augments Bar\n */\nmodule.exports = function () {\n // this returns 1\n return 1;\n};\n"
},
"errors": [],
"returns": [
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "numberone",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 10,
"offset": 9
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 10,
"offset": 9
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 10,
"offset": 9
}
}
},
"type": {
"type": "NameExpression",
"name": "Number"
}
}
],
"examples": [
{
"description": "foo(1);"
},
{
"description": "foo(2);"
}
],
"throws": [
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "if you give it something",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 25,
"offset": 24
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 25,
"offset": 24
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 25,
"offset": 24
}
}
},
"type": {
"type": "NameExpression",
"name": "Error"
}
},
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "if you give it something else",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 30,
"offset": 29
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 30,
"offset": 29
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 30,
"offset": 29
}
}
},
"type": {
"type": "NameExpression",
"name": "TypeError"
}
}
],
"augments": [
{
"title": "augments",
"description": null,
"lineNumber": 9,
"type": null,
"name": "Foo"
},
{
"title": "augments",
"description": null,
"lineNumber": 10,
"type": null,
"name": "Bar"
}
],
"name": "multiexample.input",
"kind": "function",
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "multiexample.input",
"kind": "function"
}
],
"namespace": "multiexample.input"
}
]