a354a77030
* 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
746 lines
14 KiB
Plaintext
746 lines
14 KiB
Plaintext
[
|
|
{
|
|
"marker": {
|
|
"fileName": "/tests/cases/fourslash/quickInfoJSDocTags.ts",
|
|
"position": 977,
|
|
"name": "1"
|
|
},
|
|
"quickInfo": {
|
|
"kind": "constructor",
|
|
"kindModifiers": "",
|
|
"textSpan": {
|
|
"start": 977,
|
|
"length": 3
|
|
},
|
|
"displayParts": [
|
|
{
|
|
"text": "constructor",
|
|
"kind": "keyword"
|
|
},
|
|
{
|
|
"text": " ",
|
|
"kind": "space"
|
|
},
|
|
{
|
|
"text": "Foo",
|
|
"kind": "className"
|
|
},
|
|
{
|
|
"text": "(",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": "value",
|
|
"kind": "parameterName"
|
|
},
|
|
{
|
|
"text": ":",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": " ",
|
|
"kind": "space"
|
|
},
|
|
{
|
|
"text": "number",
|
|
"kind": "keyword"
|
|
},
|
|
{
|
|
"text": ")",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": ":",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": " ",
|
|
"kind": "space"
|
|
},
|
|
{
|
|
"text": "Foo",
|
|
"kind": "className"
|
|
}
|
|
],
|
|
"documentation": [
|
|
{
|
|
"text": "This is the constructor.",
|
|
"kind": "text"
|
|
}
|
|
],
|
|
"tags": [
|
|
{
|
|
"name": "myjsdoctag",
|
|
"text": [
|
|
{
|
|
"text": "this is a comment",
|
|
"kind": "text"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"marker": {
|
|
"fileName": "/tests/cases/fourslash/quickInfoJSDocTags.ts",
|
|
"position": 981,
|
|
"name": "10"
|
|
}
|
|
},
|
|
{
|
|
"marker": {
|
|
"fileName": "/tests/cases/fourslash/quickInfoJSDocTags.ts",
|
|
"position": 985,
|
|
"name": "2"
|
|
},
|
|
"quickInfo": {
|
|
"kind": "class",
|
|
"kindModifiers": "",
|
|
"textSpan": {
|
|
"start": 985,
|
|
"length": 3
|
|
},
|
|
"displayParts": [
|
|
{
|
|
"text": "class",
|
|
"kind": "keyword"
|
|
},
|
|
{
|
|
"text": " ",
|
|
"kind": "space"
|
|
},
|
|
{
|
|
"text": "Foo",
|
|
"kind": "className"
|
|
}
|
|
],
|
|
"documentation": [
|
|
{
|
|
"text": "This is class Foo.",
|
|
"kind": "text"
|
|
}
|
|
],
|
|
"tags": [
|
|
{
|
|
"name": "mytag",
|
|
"text": [
|
|
{
|
|
"text": "comment1 comment2",
|
|
"kind": "text"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"marker": {
|
|
"fileName": "/tests/cases/fourslash/quickInfoJSDocTags.ts",
|
|
"position": 989,
|
|
"name": "3"
|
|
},
|
|
"quickInfo": {
|
|
"kind": "method",
|
|
"kindModifiers": "static",
|
|
"textSpan": {
|
|
"start": 989,
|
|
"length": 7
|
|
},
|
|
"displayParts": [
|
|
{
|
|
"text": "(",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": "method",
|
|
"kind": "text"
|
|
},
|
|
{
|
|
"text": ")",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": " ",
|
|
"kind": "space"
|
|
},
|
|
{
|
|
"text": "Foo",
|
|
"kind": "className"
|
|
},
|
|
{
|
|
"text": ".",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": "method1",
|
|
"kind": "methodName"
|
|
},
|
|
{
|
|
"text": "(",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": ")",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": ":",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": " ",
|
|
"kind": "space"
|
|
},
|
|
{
|
|
"text": "void",
|
|
"kind": "keyword"
|
|
}
|
|
],
|
|
"documentation": [
|
|
{
|
|
"text": "method1 documentation",
|
|
"kind": "text"
|
|
}
|
|
],
|
|
"tags": [
|
|
{
|
|
"name": "mytag",
|
|
"text": [
|
|
{
|
|
"text": "comment1 comment2",
|
|
"kind": "text"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"marker": {
|
|
"fileName": "/tests/cases/fourslash/quickInfoJSDocTags.ts",
|
|
"position": 997,
|
|
"name": "11"
|
|
}
|
|
},
|
|
{
|
|
"marker": {
|
|
"fileName": "/tests/cases/fourslash/quickInfoJSDocTags.ts",
|
|
"position": 1004,
|
|
"name": "4"
|
|
},
|
|
"quickInfo": {
|
|
"kind": "method",
|
|
"kindModifiers": "",
|
|
"textSpan": {
|
|
"start": 1004,
|
|
"length": 7
|
|
},
|
|
"displayParts": [
|
|
{
|
|
"text": "(",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": "method",
|
|
"kind": "text"
|
|
},
|
|
{
|
|
"text": ")",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": " ",
|
|
"kind": "space"
|
|
},
|
|
{
|
|
"text": "Foo",
|
|
"kind": "className"
|
|
},
|
|
{
|
|
"text": ".",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": "method2",
|
|
"kind": "methodName"
|
|
},
|
|
{
|
|
"text": "(",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": ")",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": ":",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": " ",
|
|
"kind": "space"
|
|
},
|
|
{
|
|
"text": "void",
|
|
"kind": "keyword"
|
|
}
|
|
],
|
|
"documentation": [],
|
|
"tags": [
|
|
{
|
|
"name": "mytag"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"marker": {
|
|
"fileName": "/tests/cases/fourslash/quickInfoJSDocTags.ts",
|
|
"position": 1012,
|
|
"name": "12"
|
|
}
|
|
},
|
|
{
|
|
"marker": {
|
|
"fileName": "/tests/cases/fourslash/quickInfoJSDocTags.ts",
|
|
"position": 1019,
|
|
"name": "5"
|
|
},
|
|
"quickInfo": {
|
|
"kind": "method",
|
|
"kindModifiers": "",
|
|
"textSpan": {
|
|
"start": 1019,
|
|
"length": 7
|
|
},
|
|
"displayParts": [
|
|
{
|
|
"text": "(",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": "method",
|
|
"kind": "text"
|
|
},
|
|
{
|
|
"text": ")",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": " ",
|
|
"kind": "space"
|
|
},
|
|
{
|
|
"text": "Foo",
|
|
"kind": "className"
|
|
},
|
|
{
|
|
"text": ".",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": "method3",
|
|
"kind": "methodName"
|
|
},
|
|
{
|
|
"text": "(",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": ")",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": ":",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": " ",
|
|
"kind": "space"
|
|
},
|
|
{
|
|
"text": "number",
|
|
"kind": "keyword"
|
|
}
|
|
],
|
|
"documentation": [],
|
|
"tags": [
|
|
{
|
|
"name": "returns",
|
|
"text": [
|
|
{
|
|
"text": "a value",
|
|
"kind": "text"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"marker": {
|
|
"fileName": "/tests/cases/fourslash/quickInfoJSDocTags.ts",
|
|
"position": 1027,
|
|
"name": "13"
|
|
}
|
|
},
|
|
{
|
|
"marker": {
|
|
"fileName": "/tests/cases/fourslash/quickInfoJSDocTags.ts",
|
|
"position": 1034,
|
|
"name": "6"
|
|
},
|
|
"quickInfo": {
|
|
"kind": "method",
|
|
"kindModifiers": "",
|
|
"textSpan": {
|
|
"start": 1034,
|
|
"length": 7
|
|
},
|
|
"displayParts": [
|
|
{
|
|
"text": "(",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": "method",
|
|
"kind": "text"
|
|
},
|
|
{
|
|
"text": ")",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": " ",
|
|
"kind": "space"
|
|
},
|
|
{
|
|
"text": "Foo",
|
|
"kind": "className"
|
|
},
|
|
{
|
|
"text": ".",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": "method4",
|
|
"kind": "methodName"
|
|
},
|
|
{
|
|
"text": "(",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": "foo",
|
|
"kind": "parameterName"
|
|
},
|
|
{
|
|
"text": ":",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": " ",
|
|
"kind": "space"
|
|
},
|
|
{
|
|
"text": "string",
|
|
"kind": "keyword"
|
|
},
|
|
{
|
|
"text": ")",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": ":",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": " ",
|
|
"kind": "space"
|
|
},
|
|
{
|
|
"text": "number",
|
|
"kind": "keyword"
|
|
}
|
|
],
|
|
"documentation": [],
|
|
"tags": [
|
|
{
|
|
"name": "param",
|
|
"text": [
|
|
{
|
|
"text": "foo",
|
|
"kind": "parameterName"
|
|
},
|
|
{
|
|
"text": " ",
|
|
"kind": "space"
|
|
},
|
|
{
|
|
"text": "A value.",
|
|
"kind": "text"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "returns",
|
|
"text": [
|
|
{
|
|
"text": "Another value",
|
|
"kind": "text"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "mytag"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"marker": {
|
|
"fileName": "/tests/cases/fourslash/quickInfoJSDocTags.ts",
|
|
"position": 1049,
|
|
"name": "7"
|
|
},
|
|
"quickInfo": {
|
|
"kind": "property",
|
|
"kindModifiers": "",
|
|
"textSpan": {
|
|
"start": 1049,
|
|
"length": 9
|
|
},
|
|
"displayParts": [
|
|
{
|
|
"text": "(",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": "property",
|
|
"kind": "text"
|
|
},
|
|
{
|
|
"text": ")",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": " ",
|
|
"kind": "space"
|
|
},
|
|
{
|
|
"text": "Foo",
|
|
"kind": "className"
|
|
},
|
|
{
|
|
"text": ".",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": "property1",
|
|
"kind": "propertyName"
|
|
},
|
|
{
|
|
"text": ":",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": " ",
|
|
"kind": "space"
|
|
},
|
|
{
|
|
"text": "string",
|
|
"kind": "keyword"
|
|
}
|
|
],
|
|
"documentation": [],
|
|
"tags": [
|
|
{
|
|
"name": "mytag",
|
|
"text": [
|
|
{
|
|
"text": "comment1 comment2",
|
|
"kind": "text"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"marker": {
|
|
"fileName": "/tests/cases/fourslash/quickInfoJSDocTags.ts",
|
|
"position": 1064,
|
|
"name": "8"
|
|
},
|
|
"quickInfo": {
|
|
"kind": "property",
|
|
"kindModifiers": "",
|
|
"textSpan": {
|
|
"start": 1064,
|
|
"length": 9
|
|
},
|
|
"displayParts": [
|
|
{
|
|
"text": "(",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": "property",
|
|
"kind": "text"
|
|
},
|
|
{
|
|
"text": ")",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": " ",
|
|
"kind": "space"
|
|
},
|
|
{
|
|
"text": "Foo",
|
|
"kind": "className"
|
|
},
|
|
{
|
|
"text": ".",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": "property2",
|
|
"kind": "propertyName"
|
|
},
|
|
{
|
|
"text": ":",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": " ",
|
|
"kind": "space"
|
|
},
|
|
{
|
|
"text": "number",
|
|
"kind": "keyword"
|
|
}
|
|
],
|
|
"documentation": [],
|
|
"tags": [
|
|
{
|
|
"name": "mytag1",
|
|
"text": [
|
|
{
|
|
"text": "some comments\nsome more comments about mytag1",
|
|
"kind": "text"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "mytag2",
|
|
"text": [
|
|
{
|
|
"text": "here all the comments are on a new line",
|
|
"kind": "text"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "mytag3"
|
|
},
|
|
{
|
|
"name": "mytag"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"marker": {
|
|
"fileName": "/tests/cases/fourslash/quickInfoJSDocTags.ts",
|
|
"position": 1079,
|
|
"name": "9"
|
|
},
|
|
"quickInfo": {
|
|
"kind": "method",
|
|
"kindModifiers": "",
|
|
"textSpan": {
|
|
"start": 1079,
|
|
"length": 7
|
|
},
|
|
"displayParts": [
|
|
{
|
|
"text": "(",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": "method",
|
|
"kind": "text"
|
|
},
|
|
{
|
|
"text": ")",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": " ",
|
|
"kind": "space"
|
|
},
|
|
{
|
|
"text": "Foo",
|
|
"kind": "className"
|
|
},
|
|
{
|
|
"text": ".",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": "method5",
|
|
"kind": "methodName"
|
|
},
|
|
{
|
|
"text": "(",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": ")",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": ":",
|
|
"kind": "punctuation"
|
|
},
|
|
{
|
|
"text": " ",
|
|
"kind": "space"
|
|
},
|
|
{
|
|
"text": "void",
|
|
"kind": "keyword"
|
|
}
|
|
],
|
|
"documentation": [],
|
|
"tags": [
|
|
{
|
|
"name": "mytag"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"marker": {
|
|
"fileName": "/tests/cases/fourslash/quickInfoJSDocTags.ts",
|
|
"position": 1100,
|
|
"name": "14"
|
|
},
|
|
"quickInfo": {
|
|
"kind": "",
|
|
"kindModifiers": "",
|
|
"textSpan": {
|
|
"start": 1094,
|
|
"length": 6
|
|
},
|
|
"displayParts": [
|
|
{
|
|
"text": "any",
|
|
"kind": "keyword"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
] |