documentation/test/fixture/document-exported.output.json
Erik Arvidsson 71922c7c8a Handle assignments in document exported (#544)
This improves detection of cases where we have:

```js
export const f = function () {};
export const o = { ... };
```

and similarly indirection using default/named.

```js
const f = function () {};
export {f};
```

Fixes #543
2016-09-19 12:53:18 -04:00

1392 lines
24 KiB
JSON

[
{
"description": "",
"tags": [],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 3,
"column": 1
}
},
"context": {
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 3,
"column": 1
}
}
},
"errors": [],
"name": "z",
"kind": "class",
"members": {
"instance": [
{
"description": "",
"tags": [],
"loc": {
"start": {
"line": 2,
"column": 2
},
"end": {
"line": 2,
"column": 14
}
},
"context": {
"loc": {
"start": {
"line": 2,
"column": 2
},
"end": {
"line": 2,
"column": 14
}
}
},
"errors": [],
"name": "zMethod",
"kind": "function",
"memberof": "z",
"scope": "instance",
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "z",
"kind": "class"
},
{
"name": "zMethod",
"kind": "function",
"scope": "instance"
}
],
"namespace": "z#zMethod"
}
],
"static": [],
"events": []
},
"path": [
{
"name": "z",
"kind": "class"
}
],
"namespace": "z"
},
{
"description": "",
"tags": [],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 28
}
},
"context": {
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 28
}
}
},
"errors": [],
"name": "x",
"kind": "function",
"params": [
{
"title": "param",
"name": "yparam",
"lineNumber": 1
}
],
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "x",
"kind": "function"
}
],
"namespace": "x"
},
{
"description": "",
"tags": [],
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 10,
"column": 1
}
},
"context": {
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 10,
"column": 1
}
}
},
"errors": [],
"name": "Class",
"kind": "class",
"members": {
"instance": [
{
"description": "",
"tags": [],
"loc": {
"start": {
"line": 4,
"column": 2
},
"end": {
"line": 4,
"column": 18
}
},
"context": {
"loc": {
"start": {
"line": 4,
"column": 2
},
"end": {
"line": 4,
"column": 18
}
}
},
"errors": [],
"name": "classMethod",
"kind": "function",
"memberof": "Class",
"scope": "instance",
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "Class",
"kind": "class"
},
{
"name": "classMethod",
"kind": "function",
"scope": "instance"
}
],
"namespace": "Class#classMethod"
},
{
"description": "",
"tags": [],
"loc": {
"start": {
"line": 5,
"column": 2
},
"end": {
"line": 5,
"column": 22
}
},
"context": {
"loc": {
"start": {
"line": 5,
"column": 2
},
"end": {
"line": 5,
"column": 22
}
}
},
"errors": [],
"name": "classGetter",
"kind": "member",
"memberof": "Class",
"scope": "instance",
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "Class",
"kind": "class"
},
{
"name": "classGetter",
"kind": "member",
"scope": "instance"
}
],
"namespace": "Class#classGetter"
},
{
"description": "",
"tags": [],
"loc": {
"start": {
"line": 6,
"column": 2
},
"end": {
"line": 6,
"column": 23
}
},
"context": {
"loc": {
"start": {
"line": 6,
"column": 2
},
"end": {
"line": 6,
"column": 23
}
}
},
"errors": [],
"name": "classSetter",
"kind": "member",
"params": [
{
"title": "param",
"name": "v",
"lineNumber": 6
}
],
"memberof": "Class",
"scope": "instance",
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "Class",
"kind": "class"
},
{
"name": "classSetter",
"kind": "member",
"scope": "instance"
}
],
"namespace": "Class#classSetter"
}
],
"static": [
{
"description": "",
"tags": [],
"loc": {
"start": {
"line": 7,
"column": 2
},
"end": {
"line": 7,
"column": 26
}
},
"context": {
"loc": {
"start": {
"line": 7,
"column": 2
},
"end": {
"line": 7,
"column": 26
}
}
},
"errors": [],
"name": "staticMethod",
"kind": "function",
"memberof": "Class",
"scope": "static",
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "Class",
"kind": "class"
},
{
"name": "staticMethod",
"kind": "function",
"scope": "static"
}
],
"namespace": "Class.staticMethod"
},
{
"description": "",
"tags": [],
"loc": {
"start": {
"line": 8,
"column": 2
},
"end": {
"line": 8,
"column": 30
}
},
"context": {
"loc": {
"start": {
"line": 8,
"column": 2
},
"end": {
"line": 8,
"column": 30
}
}
},
"errors": [],
"name": "staticGetter",
"kind": "member",
"memberof": "Class",
"scope": "static",
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "Class",
"kind": "class"
},
{
"name": "staticGetter",
"kind": "member",
"scope": "static"
}
],
"namespace": "Class.staticGetter"
},
{
"description": "",
"tags": [],
"loc": {
"start": {
"line": 9,
"column": 2
},
"end": {
"line": 9,
"column": 31
}
},
"context": {
"loc": {
"start": {
"line": 9,
"column": 2
},
"end": {
"line": 9,
"column": 31
}
}
},
"errors": [],
"name": "staticSetter",
"kind": "member",
"params": [
{
"title": "param",
"name": "v",
"lineNumber": 9
}
],
"memberof": "Class",
"scope": "static",
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "Class",
"kind": "class"
},
{
"name": "staticSetter",
"kind": "member",
"scope": "static"
}
],
"namespace": "Class.staticSetter"
}
],
"events": []
},
"path": [
{
"name": "Class",
"kind": "class"
}
],
"namespace": "Class"
},
{
"description": "",
"tags": [],
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 25
}
},
"context": {
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 25
}
}
},
"errors": [],
"name": "T5",
"kind": "typedef",
"type": {
"type": "NameExpression",
"name": "boolean"
},
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "T5",
"kind": "typedef"
}
],
"namespace": "T5"
},
{
"description": "",
"tags": [],
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 18
}
},
"context": {
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 18
}
}
},
"errors": [],
"name": "y2Default",
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "y2Default"
}
],
"namespace": "y2Default"
},
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Description of y3",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 18,
"offset": 17
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 18,
"offset": 17
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 18,
"offset": 17
}
}
},
"tags": [],
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 7,
"column": 24
}
},
"context": {
"loc": {
"start": {
"line": 8,
"column": 0
},
"end": {
"line": 8,
"column": 31
}
}
},
"errors": [],
"name": "y4",
"kind": "function",
"params": [
{
"title": "param",
"name": "p",
"lineNumber": 8,
"type": {
"type": "NameExpression",
"name": "number"
}
}
],
"returns": [
{
"type": {
"type": "VoidLiteral"
}
}
],
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "y4",
"kind": "function"
}
],
"namespace": "y4"
},
{
"description": "",
"tags": [],
"loc": {
"start": {
"line": 12,
"column": 0
},
"end": {
"line": 18,
"column": 2
}
},
"context": {
"loc": {
"start": {
"line": 12,
"column": 0
},
"end": {
"line": 18,
"column": 2
}
}
},
"errors": [],
"name": "object",
"members": {
"instance": [],
"static": [
{
"description": "",
"tags": [],
"loc": {
"start": {
"line": 16,
"column": 2
},
"end": {
"line": 16,
"column": 10
}
},
"context": {
"loc": {
"start": {
"line": 16,
"column": 2
},
"end": {
"line": 16,
"column": 10
}
}
},
"errors": [],
"name": "prop",
"memberof": "object",
"scope": "static",
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "object"
},
{
"name": "prop",
"scope": "static"
}
],
"namespace": "object.prop"
},
{
"description": "",
"tags": [],
"loc": {
"start": {
"line": 17,
"column": 2
},
"end": {
"line": 17,
"column": 21
}
},
"context": {
"loc": {
"start": {
"line": 17,
"column": 2
},
"end": {
"line": 17,
"column": 21
}
}
},
"errors": [],
"name": "func",
"kind": "function",
"memberof": "object",
"scope": "static",
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "object"
},
{
"name": "func",
"kind": "function",
"scope": "static"
}
],
"namespace": "object.func"
}
]
},
"path": [
{
"name": "object"
}
],
"namespace": "object"
},
{
"description": "",
"tags": [],
"loc": {
"start": {
"line": 13,
"column": 2
},
"end": {
"line": 13,
"column": 13
}
},
"context": {
"loc": {
"start": {
"line": 13,
"column": 2
},
"end": {
"line": 13,
"column": 13
}
}
},
"errors": [],
"name": "method",
"kind": "function",
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "method",
"kind": "function"
}
],
"namespace": "method"
},
{
"description": "",
"tags": [],
"loc": {
"start": {
"line": 14,
"column": 2
},
"end": {
"line": 14,
"column": 17
}
},
"context": {
"loc": {
"start": {
"line": 14,
"column": 2
},
"end": {
"line": 14,
"column": 17
}
}
},
"errors": [],
"name": "getter",
"kind": "member",
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "getter",
"kind": "member"
}
],
"namespace": "getter"
},
{
"description": "",
"tags": [],
"loc": {
"start": {
"line": 15,
"column": 2
},
"end": {
"line": 15,
"column": 18
}
},
"context": {
"loc": {
"start": {
"line": 15,
"column": 2
},
"end": {
"line": 15,
"column": 18
}
}
},
"errors": [],
"name": "setter",
"kind": "member",
"params": [
{
"title": "param",
"name": "v",
"lineNumber": 15
}
],
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "setter",
"kind": "member"
}
],
"namespace": "setter"
},
{
"description": "",
"tags": [],
"loc": {
"start": {
"line": 54,
"column": 0
},
"end": {
"line": 54,
"column": 16
}
},
"context": {
"loc": {
"start": {
"line": 54,
"column": 0
},
"end": {
"line": 54,
"column": 16
}
}
},
"errors": [],
"name": "f1",
"kind": "function",
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "f1",
"kind": "function"
}
],
"namespace": "f1"
},
{
"description": "",
"tags": [],
"loc": {
"start": {
"line": 55,
"column": 0
},
"end": {
"line": 55,
"column": 16
}
},
"context": {
"loc": {
"start": {
"line": 55,
"column": 0
},
"end": {
"line": 55,
"column": 16
}
}
},
"errors": [],
"name": "f3",
"kind": "function",
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "f3",
"kind": "function"
}
],
"namespace": "f3"
},
{
"description": "",
"tags": [],
"loc": {
"start": {
"line": 59,
"column": 0
},
"end": {
"line": 59,
"column": 23
}
},
"context": {
"loc": {
"start": {
"line": 59,
"column": 0
},
"end": {
"line": 59,
"column": 23
}
}
},
"errors": [],
"name": "T",
"kind": "typedef",
"type": {
"type": "NameExpression",
"name": "number"
},
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "T",
"kind": "typedef"
}
],
"namespace": "T"
},
{
"description": "",
"tags": [],
"loc": {
"start": {
"line": 60,
"column": 0
},
"end": {
"line": 60,
"column": 17
}
},
"context": {
"loc": {
"start": {
"line": 60,
"column": 0
},
"end": {
"line": 60,
"column": 17
}
}
},
"errors": [],
"name": "T2",
"kind": "typedef",
"type": {
"type": "NameExpression",
"name": "string"
},
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "T2",
"kind": "typedef"
}
],
"namespace": "T2"
},
{
"description": "",
"tags": [],
"loc": {
"start": {
"line": 61,
"column": 0
},
"end": {
"line": 61,
"column": 17
}
},
"context": {
"loc": {
"start": {
"line": 61,
"column": 0
},
"end": {
"line": 61,
"column": 17
}
}
},
"errors": [],
"name": "T4",
"kind": "typedef",
"type": {
"type": "NameExpression",
"name": "string"
},
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "T4",
"kind": "typedef"
}
],
"namespace": "T4"
},
{
"description": "",
"tags": [],
"loc": {
"start": {
"line": 67,
"column": 0
},
"end": {
"line": 67,
"column": 33
}
},
"context": {
"loc": {
"start": {
"line": 67,
"column": 0
},
"end": {
"line": 67,
"column": 33
}
}
},
"errors": [],
"name": "f4",
"kind": "function",
"params": [
{
"title": "param",
"name": "x",
"lineNumber": 67,
"type": {
"type": "NameExpression",
"name": "X"
}
}
],
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "f4",
"kind": "function"
}
],
"namespace": "f4"
},
{
"description": "",
"tags": [],
"loc": {
"start": {
"line": 69,
"column": 4
},
"end": {
"line": 69,
"column": 26
}
},
"context": {
"loc": {
"start": {
"line": 69,
"column": 4
},
"end": {
"line": 69,
"column": 26
}
}
},
"errors": [],
"name": "f5",
"params": [
{
"title": "param",
"name": "y",
"lineNumber": 69,
"type": {
"type": "NameExpression",
"name": "Y"
}
}
],
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "f5"
}
],
"namespace": "f5"
},
{
"description": "",
"tags": [],
"loc": {
"start": {
"line": 72,
"column": 0
},
"end": {
"line": 74,
"column": 1
}
},
"context": {
"loc": {
"start": {
"line": 72,
"column": 0
},
"end": {
"line": 74,
"column": 1
}
}
},
"errors": [],
"name": "o1",
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "o1"
}
],
"namespace": "o1"
},
{
"description": "",
"tags": [],
"loc": {
"start": {
"line": 73,
"column": 2
},
"end": {
"line": 73,
"column": 10
}
},
"context": {
"loc": {
"start": {
"line": 73,
"column": 2
},
"end": {
"line": 73,
"column": 10
}
}
},
"errors": [],
"name": "om1",
"kind": "function",
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "om1",
"kind": "function"
}
],
"namespace": "om1"
},
{
"description": "",
"tags": [],
"loc": {
"start": {
"line": 76,
"column": 4
},
"end": {
"line": 78,
"column": 1
}
},
"context": {
"loc": {
"start": {
"line": 76,
"column": 4
},
"end": {
"line": 78,
"column": 1
}
}
},
"errors": [],
"name": "o2",
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "o2"
}
],
"namespace": "o2"
},
{
"description": "",
"tags": [],
"loc": {
"start": {
"line": 77,
"column": 2
},
"end": {
"line": 77,
"column": 10
}
},
"context": {
"loc": {
"start": {
"line": 77,
"column": 2
},
"end": {
"line": 77,
"column": 10
}
}
},
"errors": [],
"name": "om2",
"kind": "function",
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "om2",
"kind": "function"
}
],
"namespace": "om2"
}
]