documentation/test/fixture/params.output.json
Tom MacWright 73747306a0 refactor(nest): Better nesting implementation (#732)
* refactor(nest): Better nesting implementation

This nesting implementation uses a proper recursive tree algorithm

Fixes https://github.com/documentationjs/documentation/issues/554

BREAKING CHANGE: referencing inferred destructure params without
renaming them, like $0.x, from JSDoc comments will no longer
work. To reference them, instead add a param tag to name the
destructuring param, and then refer to members of that name.

Before:

```js
/**
 * @param {number} $0.x a member of x
 */
function a({ x }) {}
```

After:

```js
/**
 * @param {Object} options
 * @param {number} options.x a member of x
 */
function a({ x }) {}
```

* Address review comments

* Reduce testing node requirement back down to 4

* Don't output empty properties, reduce diff noise

* Rearrange and document params

* Simplify param inference, update test fixtures. This is focused around Array destructuring: documenting destructured array elements with indices instead of names, because the names are purely internal details

* Use temporary fork to get through blocker
2017-04-21 17:28:53 -04:00

2843 lines
65 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": "param",
"description": "the second param",
"lineNumber": 2,
"type": {
"type": "NameExpression",
"name": "number"
},
"name": "b"
}
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 4,
"column": 3
}
},
"context": {
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 7,
"column": 1
}
}
},
"augments": [],
"errors": [],
"examples": [],
"params": [
{
"title": "param",
"name": "a",
"lineNumber": 5
},
{
"title": "param",
"name": "b",
"lineNumber": 2,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "the second param",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 17,
"offset": 16
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 17,
"offset": 16
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 17,
"offset": 16
}
}
},
"type": {
"type": "NameExpression",
"name": "number"
}
},
{
"title": "param",
"name": "c",
"lineNumber": 5
},
{
"title": "param",
"name": "$3",
"anonymous": true,
"type": {
"type": "NameExpression",
"name": "Object"
},
"properties": [
{
"title": "param",
"name": "$3.d",
"lineNumber": 5
},
{
"title": "param",
"name": "$3.e",
"lineNumber": 5
},
{
"title": "param",
"name": "$3.f",
"lineNumber": 5
}
]
}
],
"properties": [],
"returns": [],
"sees": [],
"throws": [],
"todos": [],
"name": "addThem",
"kind": "function",
"members": {
"global": [],
"inner": [],
"instance": [],
"events": [],
"static": []
},
"path": [
{
"name": "addThem",
"kind": "function"
}
],
"namespace": "addThem"
},
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "This method has partially inferred params",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 42,
"offset": 41
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 42,
"offset": 41
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 42,
"offset": 41
}
}
},
"tags": [
{
"title": "param",
"description": null,
"lineNumber": 2,
"type": {
"type": "NameExpression",
"name": "Object"
},
"name": "options"
},
{
"title": "param",
"description": "number of kinds of fish",
"lineNumber": 3,
"type": {
"type": "NameExpression",
"name": "String"
},
"name": "options.fishes"
}
],
"loc": {
"start": {
"line": 9,
"column": 0
},
"end": {
"line": 13,
"column": 3
}
},
"context": {
"loc": {
"start": {
"line": 14,
"column": 0
},
"end": {
"line": 16,
"column": 1
}
}
},
"augments": [],
"errors": [],
"examples": [],
"params": [
{
"title": "param",
"name": "options",
"lineNumber": 2,
"type": {
"type": "NameExpression",
"name": "Object"
},
"properties": [
{
"title": "param",
"name": "options.fishes",
"lineNumber": 3,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "number of kinds of fish",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 24,
"offset": 23
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 24,
"offset": 23
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 24,
"offset": 23
}
}
},
"type": {
"type": "NameExpression",
"name": "String"
}
},
{
"title": "param",
"name": "options.foxes",
"lineNumber": 14
}
]
}
],
"properties": [],
"returns": [],
"sees": [],
"throws": [],
"todos": [],
"name": "fishesAndFoxes",
"kind": "function",
"members": {
"global": [],
"inner": [],
"instance": [],
"events": [],
"static": []
},
"path": [
{
"name": "fishesAndFoxes",
"kind": "function"
}
],
"namespace": "fishesAndFoxes"
},
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "This method has a type in the description and a default in the code",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 68,
"offset": 67
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 68,
"offset": 67
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 68,
"offset": 67
}
}
},
"tags": [
{
"title": "param",
"description": null,
"lineNumber": 2,
"type": {
"type": "NameExpression",
"name": "number"
},
"name": "x"
}
],
"loc": {
"start": {
"line": 18,
"column": 0
},
"end": {
"line": 21,
"column": 3
}
},
"context": {
"loc": {
"start": {
"line": 22,
"column": 0
},
"end": {
"line": 24,
"column": 1
}
}
},
"augments": [],
"errors": [],
"examples": [],
"params": [
{
"title": "param",
"name": "x",
"lineNumber": 2,
"type": {
"type": "OptionalType",
"expression": {
"type": "NameExpression",
"name": "number"
}
},
"default": "2"
}
],
"properties": [],
"returns": [],
"sees": [],
"throws": [],
"todos": [],
"name": "withDefault",
"kind": "function",
"members": {
"global": [],
"inner": [],
"instance": [],
"events": [],
"static": []
},
"path": [
{
"name": "withDefault",
"kind": "function"
}
],
"namespace": "withDefault"
},
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "This is foo's documentation",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 28,
"offset": 27
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 28,
"offset": 27
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 28,
"offset": 27
}
}
},
"tags": [],
"loc": {
"start": {
"line": 26,
"column": 0
},
"end": {
"line": 28,
"column": 3
}
},
"context": {
"loc": {
"start": {
"line": 29,
"column": 0
},
"end": {
"line": 35,
"column": 1
}
}
},
"augments": [],
"errors": [],
"examples": [],
"params": [],
"properties": [],
"returns": [],
"sees": [],
"throws": [],
"todos": [],
"name": "Foo",
"kind": "class",
"members": {
"global": [],
"inner": [],
"instance": [
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The method",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 11,
"offset": 10
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 11,
"offset": 10
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 11,
"offset": 10
}
}
},
"tags": [
{
"title": "param",
"description": "Param to method",
"lineNumber": 2,
"type": {
"type": "NameExpression",
"name": "number"
},
"name": "x"
}
],
"loc": {
"start": {
"line": 30,
"column": 2
},
"end": {
"line": 33,
"column": 5
}
},
"context": {
"loc": {
"start": {
"line": 34,
"column": 2
},
"end": {
"line": 34,
"column": 14
}
}
},
"augments": [],
"errors": [],
"examples": [],
"params": [
{
"title": "param",
"name": "x",
"lineNumber": 2,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Param to method",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 16,
"offset": 15
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 16,
"offset": 15
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 16,
"offset": 15
}
}
},
"type": {
"type": "NameExpression",
"name": "number"
}
}
],
"properties": [],
"returns": [],
"sees": [],
"throws": [],
"todos": [],
"name": "method",
"kind": "function",
"memberof": "Foo",
"scope": "instance",
"members": {
"global": [],
"inner": [],
"instance": [],
"events": [],
"static": []
},
"path": [
{
"name": "Foo",
"kind": "class"
},
{
"name": "method",
"kind": "function",
"scope": "instance"
}
],
"namespace": "Foo#method"
}
],
"events": [],
"static": []
},
"path": [
{
"name": "Foo",
"kind": "class"
}
],
"namespace": "Foo"
},
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Traditional object",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 19,
"offset": 18
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 19,
"offset": 18
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 19,
"offset": 18
}
}
},
"tags": [],
"loc": {
"start": {
"line": 37,
"column": 0
},
"end": {
"line": 39,
"column": 3
}
},
"context": {
"loc": {
"start": {
"line": 40,
"column": 0
},
"end": {
"line": 47,
"column": 2
}
}
},
"augments": [],
"errors": [],
"examples": [],
"params": [],
"properties": [],
"returns": [],
"sees": [],
"throws": [],
"todos": [],
"name": "TraditionalObject",
"members": {
"global": [],
"inner": [],
"instance": [],
"events": [],
"static": [
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "This method should acquire the param x",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 39,
"offset": 38
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 39,
"offset": 38
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 39,
"offset": 38
}
}
},
"tags": [],
"loc": {
"start": {
"line": 41,
"column": 2
},
"end": {
"line": 43,
"column": 5
}
},
"context": {
"loc": {
"start": {
"line": 44,
"column": 2
},
"end": {
"line": 46,
"column": 3
}
}
},
"augments": [],
"errors": [],
"examples": [],
"params": [
{
"title": "param",
"name": "x",
"lineNumber": 44
}
],
"properties": [],
"returns": [],
"sees": [],
"throws": [],
"todos": [],
"name": "traditionalMethod",
"kind": "function",
"memberof": "TraditionalObject",
"scope": "static",
"members": {
"global": [],
"inner": [],
"instance": [],
"events": [],
"static": []
},
"path": [
{
"name": "TraditionalObject"
},
{
"name": "traditionalMethod",
"kind": "function",
"scope": "static"
}
],
"namespace": "TraditionalObject.traditionalMethod"
}
]
},
"path": [
{
"name": "TraditionalObject"
}
],
"namespace": "TraditionalObject"
},
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Represents an IPv6 address",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 27,
"offset": 26
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 27,
"offset": 26
},
"indent": []
}
},
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "This tests our support of optional parameters",
"position": {
"start": {
"line": 3,
"column": 1,
"offset": 28
},
"end": {
"line": 3,
"column": 47,
"offset": 74
},
"indent": []
}
}
],
"position": {
"start": {
"line": 3,
"column": 1,
"offset": 28
},
"end": {
"line": 3,
"column": 47,
"offset": 74
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 3,
"column": 47,
"offset": 74
}
}
},
"tags": [
{
"title": "class",
"description": null,
"lineNumber": 4,
"type": null,
"name": "Address6"
},
{
"title": "param",
"description": "An IPv6 address string",
"lineNumber": 5,
"type": {
"type": "NameExpression",
"name": "string"
},
"name": "address"
},
{
"title": "param",
"description": "How many octets to parse",
"lineNumber": 6,
"type": {
"type": "OptionalType",
"expression": {
"type": "NameExpression",
"name": "number"
}
},
"name": "groups",
"default": "8"
},
{
"title": "param",
"description": "A third argument",
"lineNumber": 7,
"type": {
"type": "NullableType",
"expression": {
"type": "NameExpression",
"name": "number"
},
"prefix": true
},
"name": "third"
},
{
"title": "param",
"description": "to properly be parsed",
"lineNumber": 8,
"type": {
"type": "OptionalType",
"expression": {
"type": "NameExpression",
"name": "Array"
}
},
"name": "foo",
"default": "[1]"
},
{
"title": "example",
"description": "var address = new Address6('2001::/32');",
"lineNumber": 9
}
],
"loc": {
"start": {
"line": 49,
"column": 0
},
"end": {
"line": 60,
"column": 3
}
},
"context": {
"loc": {
"start": {
"line": 61,
"column": 0
},
"end": {
"line": 61,
"column": 22
}
}
},
"augments": [],
"errors": [],
"examples": [
{
"description": "var address = new Address6('2001::/32');"
}
],
"params": [
{
"title": "param",
"name": "address",
"lineNumber": 5,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An IPv6 address string",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 23,
"offset": 22
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 23,
"offset": 22
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 23,
"offset": 22
}
}
},
"type": {
"type": "NameExpression",
"name": "string"
}
},
{
"title": "param",
"name": "groups",
"lineNumber": 6,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "How many octets to parse",
"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": "OptionalType",
"expression": {
"type": "NameExpression",
"name": "number"
}
},
"default": "8"
},
{
"title": "param",
"name": "third",
"lineNumber": 7,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A third argument",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 17,
"offset": 16
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 17,
"offset": 16
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 17,
"offset": 16
}
}
},
"type": {
"type": "NullableType",
"expression": {
"type": "NameExpression",
"name": "number"
},
"prefix": true
}
},
{
"title": "param",
"name": "foo",
"lineNumber": 8,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "to properly be parsed",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 22,
"offset": 21
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 22,
"offset": 21
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 22,
"offset": 21
}
}
},
"type": {
"type": "OptionalType",
"expression": {
"type": "NameExpression",
"name": "Array"
}
},
"default": "[1]"
}
],
"properties": [],
"returns": [],
"sees": [],
"throws": [],
"todos": [],
"kind": "class",
"name": "Address6",
"members": {
"global": [],
"inner": [],
"instance": [],
"events": [],
"static": []
},
"path": [
{
"name": "Address6",
"kind": "class"
}
],
"namespace": "Address6"
},
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Create a GeoJSON data source instance given an options object",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 62,
"offset": 61
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 62,
"offset": 61
},
"indent": []
}
},
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "This tests our support of nested parameters",
"position": {
"start": {
"line": 3,
"column": 1,
"offset": 63
},
"end": {
"line": 3,
"column": 44,
"offset": 106
},
"indent": []
}
}
],
"position": {
"start": {
"line": 3,
"column": 1,
"offset": 63
},
"end": {
"line": 3,
"column": 44,
"offset": 106
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 3,
"column": 44,
"offset": 106
}
}
},
"tags": [
{
"title": "class",
"description": null,
"lineNumber": 4,
"type": null,
"name": "GeoJSONSource"
},
{
"title": "param",
"description": "optional options",
"lineNumber": 5,
"type": {
"type": "OptionalType",
"expression": {
"type": "NameExpression",
"name": "Object"
}
},
"name": "options"
},
{
"title": "param",
"description": "A GeoJSON data object or URL to it.\nThe latter is preferable in case of large GeoJSON files.",
"lineNumber": 6,
"type": {
"type": "UnionType",
"elements": [
{
"type": "NameExpression",
"name": "Object"
},
{
"type": "NameExpression",
"name": "string"
}
]
},
"name": "options.data"
},
{
"title": "param",
"description": "Maximum zoom to preserve detail at.",
"lineNumber": 8,
"type": {
"type": "OptionalType",
"expression": {
"type": "NameExpression",
"name": "number"
}
},
"name": "options.maxzoom",
"default": "14"
},
{
"title": "param",
"description": "Tile buffer on each side.",
"lineNumber": 9,
"type": {
"type": "OptionalType",
"expression": {
"type": "NameExpression",
"name": "number"
}
},
"name": "options.buffer"
},
{
"title": "param",
"description": "Simplification tolerance (higher means simpler).",
"lineNumber": 10,
"type": {
"type": "OptionalType",
"expression": {
"type": "NameExpression",
"name": "number"
}
},
"name": "options.tolerance"
}
],
"loc": {
"start": {
"line": 63,
"column": 0
},
"end": {
"line": 74,
"column": 3
}
},
"context": {
"loc": {
"start": {
"line": 75,
"column": 0
},
"end": {
"line": 77,
"column": 1
}
}
},
"augments": [],
"errors": [],
"examples": [],
"params": [
{
"title": "param",
"name": "options",
"lineNumber": 5,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "optional options",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 17,
"offset": 16
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 17,
"offset": 16
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 17,
"offset": 16
}
}
},
"type": {
"type": "OptionalType",
"expression": {
"type": "NameExpression",
"name": "Object"
}
},
"properties": [
{
"title": "param",
"name": "options.data",
"lineNumber": 6,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A GeoJSON data object or URL to it.\nThe latter is preferable in case of large GeoJSON files.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 57,
"offset": 92
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 57,
"offset": 92
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 57,
"offset": 92
}
}
},
"type": {
"type": "UnionType",
"elements": [
{
"type": "NameExpression",
"name": "Object"
},
{
"type": "NameExpression",
"name": "string"
}
]
}
},
{
"title": "param",
"name": "options.maxzoom",
"lineNumber": 8,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Maximum zoom to preserve detail at.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 36,
"offset": 35
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 36,
"offset": 35
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 36,
"offset": 35
}
}
},
"type": {
"type": "OptionalType",
"expression": {
"type": "NameExpression",
"name": "number"
}
},
"default": "14"
},
{
"title": "param",
"name": "options.buffer",
"lineNumber": 9,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Tile buffer on each side.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 26,
"offset": 25
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 26,
"offset": 25
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 26,
"offset": 25
}
}
},
"type": {
"type": "OptionalType",
"expression": {
"type": "NameExpression",
"name": "number"
}
}
},
{
"title": "param",
"name": "options.tolerance",
"lineNumber": 10,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Simplification tolerance (higher means simpler).",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 49,
"offset": 48
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 49,
"offset": 48
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 49,
"offset": 48
}
}
},
"type": {
"type": "OptionalType",
"expression": {
"type": "NameExpression",
"name": "number"
}
}
}
]
}
],
"properties": [],
"returns": [],
"sees": [],
"throws": [],
"todos": [],
"kind": "class",
"name": "GeoJSONSource",
"members": {
"global": [],
"inner": [],
"instance": [],
"events": [],
"static": []
},
"path": [
{
"name": "GeoJSONSource",
"kind": "class"
}
],
"namespace": "GeoJSONSource"
},
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "This tests our support for parameters with explicit types but with default\nvalues specified in code.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 26,
"offset": 100
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 26,
"offset": 100
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 26,
"offset": 100
}
}
},
"tags": [
{
"title": "param",
"description": "an argument",
"lineNumber": 4,
"type": {
"type": "NameExpression",
"name": "number"
},
"name": "x"
},
{
"title": "returns",
"description": "some",
"lineNumber": 6,
"type": {
"type": "NameExpression",
"name": "number"
}
}
],
"loc": {
"start": {
"line": 79,
"column": 0
},
"end": {
"line": 86,
"column": 3
}
},
"context": {
"loc": {
"start": {
"line": 87,
"column": 0
},
"end": {
"line": 87,
"column": 37
}
}
},
"augments": [],
"errors": [],
"examples": [],
"params": [
{
"title": "param",
"name": "x",
"lineNumber": 4,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "an argument",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 12,
"offset": 11
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 12,
"offset": 11
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 12,
"offset": 11
}
}
},
"type": {
"type": "OptionalType",
"expression": {
"type": "NameExpression",
"name": "number"
}
},
"default": "123"
}
],
"properties": [],
"returns": [
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "some",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 5,
"offset": 4
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 5,
"offset": 4
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 5,
"offset": 4
}
}
},
"title": "returns",
"type": {
"type": "NameExpression",
"name": "number"
}
}
],
"sees": [],
"throws": [],
"todos": [],
"name": "myfunc",
"kind": "constant",
"members": {
"global": [],
"inner": [],
"instance": [],
"events": [],
"static": []
},
"path": [
{
"name": "myfunc",
"kind": "constant"
}
],
"namespace": "myfunc"
},
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "This tests our support of JSDoc param tags without type information,\nor any type information we could infer from annotations.",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 57,
"offset": 125
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 57,
"offset": 125
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 57,
"offset": 125
}
}
},
"tags": [
{
"title": "param",
"description": "An IPv6 address string",
"lineNumber": 4,
"type": null,
"name": "address"
}
],
"loc": {
"start": {
"line": 89,
"column": 0
},
"end": {
"line": 94,
"column": 3
}
},
"context": {
"loc": {
"start": {
"line": 95,
"column": 0
},
"end": {
"line": 97,
"column": 1
}
}
},
"augments": [],
"errors": [],
"examples": [],
"params": [
{
"title": "param",
"name": "address",
"lineNumber": 4,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An IPv6 address string",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 23,
"offset": 22
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 23,
"offset": 22
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 23,
"offset": 22
}
}
}
}
],
"properties": [],
"returns": [],
"sees": [],
"throws": [],
"todos": [],
"name": "foo",
"kind": "function",
"members": {
"global": [],
"inner": [],
"instance": [],
"events": [],
"static": []
},
"path": [
{
"name": "foo",
"kind": "function"
}
],
"namespace": "foo"
},
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "This tests our support for iterator rest inside an\niterator destructure (RestElement)",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 35,
"offset": 85
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 35,
"offset": 85
},
"indent": [
1
]
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 2,
"column": 35,
"offset": 85
}
}
},
"tags": [
{
"title": "param",
"description": null,
"lineNumber": 4,
"type": {
"type": "NameExpression",
"name": "Array"
},
"name": "input"
},
{
"title": "param",
"description": "head of iterator",
"lineNumber": 5,
"type": {
"type": "NameExpression",
"name": "any"
},
"name": "input.0"
},
{
"title": "param",
"description": "body of iterator",
"lineNumber": 6,
"type": {
"type": "RestType",
"expression": {
"type": "NameExpression",
"name": "any"
}
},
"name": "input.xs"
},
{
"title": "returns",
"description": "rotated such that the last element was the first",
"lineNumber": 8,
"type": {
"type": "TypeApplication",
"expression": {
"type": "NameExpression",
"name": "Array"
},
"applications": [
{
"type": "NameExpression",
"name": "any"
}
]
}
}
],
"loc": {
"start": {
"line": 99,
"column": 0
},
"end": {
"line": 108,
"column": 3
}
},
"context": {
"loc": {
"start": {
"line": 109,
"column": 0
},
"end": {
"line": 111,
"column": 1
}
}
},
"augments": [],
"errors": [],
"examples": [],
"params": [
{
"title": "param",
"name": "input",
"lineNumber": 4,
"type": {
"type": "NameExpression",
"name": "Array"
},
"properties": [
{
"title": "param",
"name": "input.0",
"lineNumber": 5,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "head of iterator",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 17,
"offset": 16
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 17,
"offset": 16
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 17,
"offset": 16
}
}
},
"type": {
"type": "NameExpression",
"name": "any"
}
},
{
"title": "param",
"name": "input.xs",
"lineNumber": 6,
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "body of iterator",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 17,
"offset": 16
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 17,
"offset": 16
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 17,
"offset": 16
}
}
},
"type": {
"type": "RestType",
"expression": {
"type": "NameExpression",
"name": "any"
}
}
}
]
}
],
"properties": [],
"returns": [
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "rotated such that the last element was the first",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 49,
"offset": 48
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 49,
"offset": 48
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 49,
"offset": 48
}
}
},
"title": "returns",
"type": {
"type": "TypeApplication",
"expression": {
"type": "NameExpression",
"name": "Array"
},
"applications": [
{
"type": "NameExpression",
"name": "any"
}
]
}
}
],
"sees": [],
"throws": [],
"todos": [],
"name": "rotate",
"kind": "function",
"members": {
"global": [],
"inner": [],
"instance": [],
"events": [],
"static": []
},
"path": [
{
"name": "rotate",
"kind": "function"
}
],
"namespace": "rotate"
}
]