documentation/test/fixture/trailing.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

425 lines
8.9 KiB
JSON

[
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ONE",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 4,
"offset": 3
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 4,
"offset": 3
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 4,
"offset": 3
}
}
},
"tags": [
{
"title": "returns",
"description": "something",
"lineNumber": 2,
"type": {
"type": "NameExpression",
"name": "number"
}
}
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 4,
"column": 3
}
},
"context": {
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 7,
"column": 1
}
},
"code": "/**\n * ONE\n * @returns {number} something\n */\nfunction fooBar() {\n return 1;\n}\n/**\n * TWO\n * @returns {number} something\n */\nfunction fooBaz() {\n return 2;\n}\n/**\n * this is a type\n * @class Something\n */\n"
},
"errors": [],
"returns": [
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "something",
"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"
}
}
],
"name": "fooBar",
"kind": "function",
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "fooBar",
"kind": "function"
}
],
"namespace": "fooBar"
},
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "TWO",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 4,
"offset": 3
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 4,
"offset": 3
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 4,
"offset": 3
}
}
},
"tags": [
{
"title": "returns",
"description": "something",
"lineNumber": 2,
"type": {
"type": "NameExpression",
"name": "number"
}
}
],
"loc": {
"start": {
"line": 8,
"column": 0
},
"end": {
"line": 11,
"column": 3
}
},
"context": {
"loc": {
"start": {
"line": 12,
"column": 0
},
"end": {
"line": 14,
"column": 1
}
},
"code": "/**\n * ONE\n * @returns {number} something\n */\nfunction fooBar() {\n return 1;\n}\n/**\n * TWO\n * @returns {number} something\n */\nfunction fooBaz() {\n return 2;\n}\n/**\n * this is a type\n * @class Something\n */\n"
},
"errors": [],
"returns": [
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "something",
"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"
}
}
],
"name": "fooBaz",
"kind": "function",
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "fooBaz",
"kind": "function"
}
],
"namespace": "fooBaz"
},
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "this is a type",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 15,
"offset": 14
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 15,
"offset": 14
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 15,
"offset": 14
}
}
},
"tags": [
{
"title": "class",
"description": null,
"lineNumber": 2,
"type": null,
"name": "Something"
}
],
"loc": {
"start": {
"line": 15,
"column": 0
},
"end": {
"line": 18,
"column": 3
}
},
"context": {
"loc": {
"start": {
"line": 12,
"column": 0
},
"end": {
"line": 14,
"column": 1
}
}
},
"errors": [],
"kind": "class",
"name": "Something",
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "Something",
"kind": "class"
}
],
"namespace": "Something"
}
]