TypeScript/tests/baselines/reference/jsDocTypeTag2.js
Andy a77c6014b3
Parse comment on @property tag and use as documentation comment (#21119)
* Parse comment on @property tag and use as documentation comment

* Fix comment parsing bug -- back up after seeing `@` character

* Add test for indent

* Don't default comment to ""
2018-01-11 10:49:39 -08:00

638 lines
11 KiB
TypeScript

[
{
"marker": {
"fileName": "/tests/cases/fourslash/jsDocTypeTag2.js",
"position": 26
},
"quickInfo": {
"kind": "var",
"kindModifiers": "",
"textSpan": {
"start": 26,
"length": 1
},
"displayParts": [
{
"text": "var",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "s",
"kind": "localName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "string",
"kind": "keyword"
}
],
"documentation": [],
"tags": [
{
"name": "type",
"text": "{string}"
}
]
}
},
{
"marker": {
"fileName": "/tests/cases/fourslash/jsDocTypeTag2.js",
"position": 55
},
"quickInfo": {
"kind": "var",
"kindModifiers": "",
"textSpan": {
"start": 55,
"length": 1
},
"displayParts": [
{
"text": "var",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "n",
"kind": "localName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "number",
"kind": "keyword"
}
],
"documentation": [],
"tags": [
{
"name": "type",
"text": "{number}"
}
]
}
},
{
"marker": {
"fileName": "/tests/cases/fourslash/jsDocTypeTag2.js",
"position": 85
},
"quickInfo": {
"kind": "var",
"kindModifiers": "",
"textSpan": {
"start": 85,
"length": 1
},
"displayParts": [
{
"text": "var",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "b",
"kind": "localName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "boolean",
"kind": "keyword"
}
],
"documentation": [],
"tags": [
{
"name": "type",
"text": "{boolean}"
}
]
}
},
{
"marker": {
"fileName": "/tests/cases/fourslash/jsDocTypeTag2.js",
"position": 112
},
"quickInfo": {
"kind": "var",
"kindModifiers": "",
"textSpan": {
"start": 112,
"length": 1
},
"displayParts": [
{
"text": "var",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "v",
"kind": "localName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "void",
"kind": "keyword"
}
],
"documentation": [],
"tags": [
{
"name": "type",
"text": "{void}"
}
]
}
},
{
"marker": {
"fileName": "/tests/cases/fourslash/jsDocTypeTag2.js",
"position": 144
},
"quickInfo": {
"kind": "var",
"kindModifiers": "",
"textSpan": {
"start": 144,
"length": 1
},
"displayParts": [
{
"text": "var",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "u",
"kind": "localName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "undefined",
"kind": "keyword"
}
],
"documentation": [],
"tags": [
{
"name": "type",
"text": "{undefined}"
}
]
}
},
{
"marker": {
"fileName": "/tests/cases/fourslash/jsDocTypeTag2.js",
"position": 171
},
"quickInfo": {
"kind": "var",
"kindModifiers": "",
"textSpan": {
"start": 171,
"length": 2
},
"displayParts": [
{
"text": "var",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "nl",
"kind": "localName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "null",
"kind": "keyword"
}
],
"documentation": [],
"tags": [
{
"name": "type",
"text": "{null}"
}
]
}
},
{
"marker": {
"fileName": "/tests/cases/fourslash/jsDocTypeTag2.js",
"position": 200
},
"quickInfo": {
"kind": "var",
"kindModifiers": "",
"textSpan": {
"start": 200,
"length": 1
},
"displayParts": [
{
"text": "var",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "a",
"kind": "localName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "any",
"kind": "keyword"
},
{
"text": "[",
"kind": "punctuation"
},
{
"text": "]",
"kind": "punctuation"
}
],
"documentation": [],
"tags": [
{
"name": "type",
"text": "{array}"
}
]
}
},
{
"marker": {
"fileName": "/tests/cases/fourslash/jsDocTypeTag2.js",
"position": 230
},
"quickInfo": {
"kind": "var",
"kindModifiers": "",
"textSpan": {
"start": 230,
"length": 1
},
"displayParts": [
{
"text": "var",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "p",
"kind": "localName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "Promise",
"kind": "interfaceName"
},
{
"text": "<",
"kind": "punctuation"
},
{
"text": "any",
"kind": "keyword"
},
{
"text": ">",
"kind": "punctuation"
}
],
"documentation": [],
"tags": [
{
"name": "type",
"text": "{promise}"
}
]
}
},
{
"marker": {
"fileName": "/tests/cases/fourslash/jsDocTypeTag2.js",
"position": 260
},
"quickInfo": {
"kind": "var",
"kindModifiers": "",
"textSpan": {
"start": 260,
"length": 8
},
"displayParts": [
{
"text": "var",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "nullable",
"kind": "localName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "number",
"kind": "keyword"
}
],
"documentation": [],
"tags": [
{
"name": "type",
"text": "{?number}"
}
]
}
},
{
"marker": {
"fileName": "/tests/cases/fourslash/jsDocTypeTag2.js",
"position": 298
},
"quickInfo": {
"kind": "var",
"kindModifiers": "",
"textSpan": {
"start": 298,
"length": 4
},
"displayParts": [
{
"text": "var",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "func",
"kind": "localName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "Function",
"kind": "localName"
}
],
"documentation": [],
"tags": [
{
"name": "type",
"text": "{function}"
}
]
}
},
{
"marker": {
"fileName": "/tests/cases/fourslash/jsDocTypeTag2.js",
"position": 349
},
"quickInfo": {
"kind": "var",
"kindModifiers": "",
"textSpan": {
"start": 349,
"length": 5
},
"displayParts": [
{
"text": "var",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "func1",
"kind": "localName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "(",
"kind": "punctuation"
},
{
"text": "arg0",
"kind": "parameterName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "number",
"kind": "keyword"
},
{
"text": ")",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "=>",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "number",
"kind": "keyword"
}
],
"documentation": [],
"tags": [
{
"name": "type",
"text": "{function (number): number}"
}
]
}
},
{
"marker": {
"fileName": "/tests/cases/fourslash/jsDocTypeTag2.js",
"position": 391
},
"quickInfo": {
"kind": "var",
"kindModifiers": "",
"textSpan": {
"start": 391,
"length": 4
},
"displayParts": [
{
"text": "var",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "sOrn",
"kind": "localName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "string",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "|",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "number",
"kind": "keyword"
}
],
"documentation": [],
"tags": [
{
"name": "type",
"text": "{string | number}"
}
]
}
}
]