TypeScript/tests/baselines/reference/quickInfoCommentsFunctionExpression.baseline
Sang a354a77030
Improve rendering of JSDoc comment text with displayparts (#43390)
* feat(services): jsdoc use custom name for display parts

* fix(services): jsdoc typo

* feat(services): revert jsDoc changes

* feat(services): jsdoc improve displayparts with more comment kinds

Improve rendering of JSDoc comment text with displayparts for:

- `@typedef`
- `@callback`
- `@param`
- `@property`

* feat(services): jsdoc improve displayparts for template

* test: accept baseline

* test: update jsdoc parameterName

* feat: resolve pr comments

* test: add fourslash tests for jsdoc callback, typedef

* test: accept baselines

* test: revert changes for api baselines

* refactor: naming

* refactor: code quality

* refactor: clean up code as to pr comments
2021-04-09 09:44:44 -07:00

1064 lines
20 KiB
Plaintext

[
{
"marker": {
"fileName": "/tests/cases/fourslash/quickInfoCommentsFunctionExpression.ts",
"position": 36,
"name": "1"
},
"quickInfo": {
"kind": "var",
"kindModifiers": "",
"textSpan": {
"start": 32,
"length": 9
},
"displayParts": [
{
"text": "var",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "lambdaFoo",
"kind": "localName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "(",
"kind": "punctuation"
},
{
"text": "a",
"kind": "parameterName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "number",
"kind": "keyword"
},
{
"text": ",",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "b",
"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": [
{
"text": "this is lambda comment",
"kind": "text"
},
{
"text": "\n",
"kind": "lineBreak"
},
{
"text": "lambdaFoo var comment",
"kind": "text"
}
]
}
},
{
"marker": {
"fileName": "/tests/cases/fourslash/quickInfoCommentsFunctionExpression.ts",
"position": 142,
"name": "3"
},
"quickInfo": {
"kind": "var",
"kindModifiers": "",
"textSpan": {
"start": 134,
"length": 19
},
"displayParts": [
{
"text": "var",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "lambddaNoVarComment",
"kind": "localName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "(",
"kind": "punctuation"
},
{
"text": "a",
"kind": "parameterName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "number",
"kind": "keyword"
},
{
"text": ",",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "b",
"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": [
{
"text": "this is lambda multiplication",
"kind": "text"
}
]
}
},
{
"marker": {
"fileName": "/tests/cases/fourslash/quickInfoCommentsFunctionExpression.ts",
"position": 277,
"name": "7"
},
"quickInfo": {
"kind": "function",
"kindModifiers": "",
"textSpan": {
"start": 277,
"length": 11
},
"displayParts": [
{
"text": "function",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "anotherFunc",
"kind": "functionName"
},
{
"text": "(",
"kind": "punctuation"
},
{
"text": "a",
"kind": "parameterName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "number",
"kind": "keyword"
},
{
"text": ")",
"kind": "punctuation"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "string",
"kind": "keyword"
}
],
"documentation": []
}
},
{
"marker": {
"fileName": "/tests/cases/fourslash/quickInfoCommentsFunctionExpression.ts",
"position": 377,
"name": "8"
},
"quickInfo": {
"kind": "local var",
"kindModifiers": "",
"textSpan": {
"start": 377,
"length": 9
},
"displayParts": [
{
"text": "(",
"kind": "punctuation"
},
{
"text": "local var",
"kind": "text"
},
{
"text": ")",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "lambdaVar",
"kind": "localName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "(",
"kind": "punctuation"
},
{
"text": "b",
"kind": "parameterName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "string",
"kind": "keyword"
},
{
"text": ")",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "=>",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "string",
"kind": "keyword"
}
],
"documentation": [
{
"text": "inner docs",
"kind": "text"
},
{
"text": "\n",
"kind": "lineBreak"
},
{
"text": "documentation",
"kind": "text"
}
],
"tags": [
{
"name": "param",
"text": [
{
"text": "b",
"kind": "parameterName"
},
{
"text": " ",
"kind": "space"
},
{
"text": "inner parameter",
"kind": "text"
}
]
}
]
}
},
{
"marker": {
"fileName": "/tests/cases/fourslash/quickInfoCommentsFunctionExpression.ts",
"position": 407,
"name": "9"
},
"quickInfo": {
"kind": "parameter",
"kindModifiers": "",
"textSpan": {
"start": 407,
"length": 1
},
"displayParts": [
{
"text": "(",
"kind": "punctuation"
},
{
"text": "parameter",
"kind": "text"
},
{
"text": ")",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "b",
"kind": "parameterName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "string",
"kind": "keyword"
}
],
"documentation": [
{
"text": "inner parameter",
"kind": "text"
}
],
"tags": [
{
"name": "param",
"text": [
{
"text": "b",
"kind": "parameterName"
},
{
"text": " ",
"kind": "space"
},
{
"text": "inner parameter",
"kind": "text"
}
]
}
]
}
},
{
"marker": {
"fileName": "/tests/cases/fourslash/quickInfoCommentsFunctionExpression.ts",
"position": 435,
"name": "10"
},
"quickInfo": {
"kind": "local var",
"kindModifiers": "",
"textSpan": {
"start": 435,
"length": 8
},
"displayParts": [
{
"text": "(",
"kind": "punctuation"
},
{
"text": "local var",
"kind": "text"
},
{
"text": ")",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "localVar",
"kind": "localName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "string",
"kind": "keyword"
}
],
"documentation": []
}
},
{
"marker": {
"fileName": "/tests/cases/fourslash/quickInfoCommentsFunctionExpression.ts",
"position": 471,
"name": "11"
},
"quickInfo": {
"kind": "local var",
"kindModifiers": "",
"textSpan": {
"start": 471,
"length": 8
},
"displayParts": [
{
"text": "(",
"kind": "punctuation"
},
{
"text": "local var",
"kind": "text"
},
{
"text": ")",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "localVar",
"kind": "localName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "string",
"kind": "keyword"
}
],
"documentation": []
}
},
{
"marker": {
"fileName": "/tests/cases/fourslash/quickInfoCommentsFunctionExpression.ts",
"position": 482,
"name": "12"
},
"quickInfo": {
"kind": "parameter",
"kindModifiers": "",
"textSpan": {
"start": 482,
"length": 1
},
"displayParts": [
{
"text": "(",
"kind": "punctuation"
},
{
"text": "parameter",
"kind": "text"
},
{
"text": ")",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "b",
"kind": "parameterName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "string",
"kind": "keyword"
}
],
"documentation": [
{
"text": "inner parameter",
"kind": "text"
}
],
"tags": [
{
"name": "param",
"text": [
{
"text": "b",
"kind": "parameterName"
},
{
"text": " ",
"kind": "space"
},
{
"text": "inner parameter",
"kind": "text"
}
]
}
]
}
},
{
"marker": {
"fileName": "/tests/cases/fourslash/quickInfoCommentsFunctionExpression.ts",
"position": 506,
"name": "13"
},
"quickInfo": {
"kind": "local var",
"kindModifiers": "",
"textSpan": {
"start": 502,
"length": 9
},
"displayParts": [
{
"text": "(",
"kind": "punctuation"
},
{
"text": "local var",
"kind": "text"
},
{
"text": ")",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "lambdaVar",
"kind": "localName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "(",
"kind": "punctuation"
},
{
"text": "b",
"kind": "parameterName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "string",
"kind": "keyword"
},
{
"text": ")",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "=>",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "string",
"kind": "keyword"
}
],
"documentation": [
{
"text": "inner docs",
"kind": "text"
},
{
"text": "\n",
"kind": "lineBreak"
},
{
"text": "documentation",
"kind": "text"
}
],
"tags": [
{
"name": "param",
"text": [
{
"text": "b",
"kind": "parameterName"
},
{
"text": " ",
"kind": "space"
},
{
"text": "inner parameter",
"kind": "text"
}
]
}
]
}
},
{
"marker": {
"fileName": "/tests/cases/fourslash/quickInfoCommentsFunctionExpression.ts",
"position": 627,
"name": "14"
},
"quickInfo": {
"kind": "var",
"kindModifiers": "",
"textSpan": {
"start": 623,
"length": 8
},
"displayParts": [
{
"text": "var",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "assigned",
"kind": "localName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "(",
"kind": "punctuation"
},
{
"text": "s",
"kind": "parameterName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "string",
"kind": "keyword"
},
{
"text": ")",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "=>",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "number",
"kind": "keyword"
}
],
"documentation": [
{
"text": "Summary on expression",
"kind": "text"
},
{
"text": "\n",
"kind": "lineBreak"
},
{
"text": "On variable",
"kind": "text"
}
],
"tags": [
{
"name": "param",
"text": [
{
"text": "s",
"kind": "parameterName"
},
{
"text": " ",
"kind": "space"
},
{
"text": "param on expression",
"kind": "text"
}
]
},
{
"name": "returns",
"text": [
{
"text": "return on expression",
"kind": "text"
}
]
},
{
"name": "param",
"text": [
{
"text": "s",
"kind": "parameterName"
},
{
"text": " ",
"kind": "space"
},
{
"text": "the first parameter!",
"kind": "text"
}
]
},
{
"name": "returns",
"text": [
{
"text": "the parameter's length",
"kind": "text"
}
]
}
]
}
},
{
"marker": {
"fileName": "/tests/cases/fourslash/quickInfoCommentsFunctionExpression.ts",
"position": 858,
"name": "16"
},
"quickInfo": {
"kind": "var",
"kindModifiers": "",
"textSpan": {
"start": 853,
"length": 8
},
"displayParts": [
{
"text": "var",
"kind": "keyword"
},
{
"text": " ",
"kind": "space"
},
{
"text": "assigned",
"kind": "localName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "(",
"kind": "punctuation"
},
{
"text": "s",
"kind": "parameterName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "string",
"kind": "keyword"
},
{
"text": ")",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "=>",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "number",
"kind": "keyword"
}
],
"documentation": [
{
"text": "Summary on expression",
"kind": "text"
},
{
"text": "\n",
"kind": "lineBreak"
},
{
"text": "On variable",
"kind": "text"
}
],
"tags": [
{
"name": "param",
"text": [
{
"text": "s",
"kind": "parameterName"
},
{
"text": " ",
"kind": "space"
},
{
"text": "param on expression",
"kind": "text"
}
]
},
{
"name": "returns",
"text": [
{
"text": "return on expression",
"kind": "text"
}
]
},
{
"name": "param",
"text": [
{
"text": "s",
"kind": "parameterName"
},
{
"text": " ",
"kind": "space"
},
{
"text": "the first parameter!",
"kind": "text"
}
]
},
{
"name": "returns",
"text": [
{
"text": "the parameter's length",
"kind": "text"
}
]
}
]
}
}
]