TypeScript/tests/baselines/reference/signatureHelpCommentsFunctionDeclaration.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

436 lines
10 KiB
Plaintext

[
{
"marker": {
"fileName": "/tests/cases/fourslash/signatureHelpCommentsFunctionDeclaration.ts",
"position": 64,
"name": "4"
},
"signatureHelp": {
"items": [
{
"isVariadic": false,
"prefixDisplayParts": [
{
"text": "foo",
"kind": "functionName"
},
{
"text": "(",
"kind": "punctuation"
}
],
"suffixDisplayParts": [
{
"text": ")",
"kind": "punctuation"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "void",
"kind": "keyword"
}
],
"separatorDisplayParts": [
{
"text": ",",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
}
],
"parameters": [],
"documentation": [
{
"text": "This comment should appear for foo",
"kind": "text"
}
],
"tags": []
}
],
"applicableSpan": {
"start": 64,
"length": 0
},
"selectedItemIndex": 0,
"argumentIndex": 0,
"argumentCount": 0
}
},
{
"marker": {
"fileName": "/tests/cases/fourslash/signatureHelpCommentsFunctionDeclaration.ts",
"position": 263,
"name": "10"
},
"signatureHelp": {
"items": [
{
"isVariadic": false,
"prefixDisplayParts": [
{
"text": "fooWithParameters",
"kind": "functionName"
},
{
"text": "(",
"kind": "punctuation"
}
],
"suffixDisplayParts": [
{
"text": ")",
"kind": "punctuation"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "void",
"kind": "keyword"
}
],
"separatorDisplayParts": [
{
"text": ",",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
}
],
"parameters": [
{
"name": "a",
"documentation": [
{
"text": "this is comment about a",
"kind": "text"
}
],
"displayParts": [
{
"text": "a",
"kind": "parameterName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "string",
"kind": "keyword"
}
],
"isOptional": false,
"isRest": false
},
{
"name": "b",
"documentation": [
{
"text": "this is comment for b",
"kind": "text"
}
],
"displayParts": [
{
"text": "b",
"kind": "parameterName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "number",
"kind": "keyword"
}
],
"isOptional": false,
"isRest": false
}
],
"documentation": [
{
"text": "This is comment for function signature",
"kind": "text"
}
],
"tags": []
}
],
"applicableSpan": {
"start": 263,
"length": 6
},
"selectedItemIndex": 0,
"argumentIndex": 0,
"argumentCount": 2
}
},
{
"marker": {
"fileName": "/tests/cases/fourslash/signatureHelpCommentsFunctionDeclaration.ts",
"position": 267,
"name": "11"
},
"signatureHelp": {
"items": [
{
"isVariadic": false,
"prefixDisplayParts": [
{
"text": "fooWithParameters",
"kind": "functionName"
},
{
"text": "(",
"kind": "punctuation"
}
],
"suffixDisplayParts": [
{
"text": ")",
"kind": "punctuation"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "void",
"kind": "keyword"
}
],
"separatorDisplayParts": [
{
"text": ",",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
}
],
"parameters": [
{
"name": "a",
"documentation": [
{
"text": "this is comment about a",
"kind": "text"
}
],
"displayParts": [
{
"text": "a",
"kind": "parameterName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "string",
"kind": "keyword"
}
],
"isOptional": false,
"isRest": false
},
{
"name": "b",
"documentation": [
{
"text": "this is comment for b",
"kind": "text"
}
],
"displayParts": [
{
"text": "b",
"kind": "parameterName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "number",
"kind": "keyword"
}
],
"isOptional": false,
"isRest": false
}
],
"documentation": [
{
"text": "This is comment for function signature",
"kind": "text"
}
],
"tags": []
}
],
"applicableSpan": {
"start": 263,
"length": 6
},
"selectedItemIndex": 0,
"argumentIndex": 1,
"argumentCount": 2
}
},
{
"marker": {
"fileName": "/tests/cases/fourslash/signatureHelpCommentsFunctionDeclaration.ts",
"position": 351,
"name": "12"
},
"signatureHelp": {
"items": [
{
"isVariadic": false,
"prefixDisplayParts": [
{
"text": "fn",
"kind": "functionName"
},
{
"text": "(",
"kind": "punctuation"
}
],
"suffixDisplayParts": [
{
"text": ")",
"kind": "punctuation"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "any",
"kind": "keyword"
}
],
"separatorDisplayParts": [
{
"text": ",",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
}
],
"parameters": [
{
"name": "a",
"documentation": [
{
"text": "a string",
"kind": "text"
}
],
"displayParts": [
{
"text": "a",
"kind": "parameterName"
},
{
"text": ":",
"kind": "punctuation"
},
{
"text": " ",
"kind": "space"
},
{
"text": "string",
"kind": "keyword"
}
],
"isOptional": false,
"isRest": false
}
],
"documentation": [
{
"text": "Does something",
"kind": "text"
}
],
"tags": [
{
"name": "param",
"text": [
{
"text": "a",
"kind": "parameterName"
},
{
"text": " ",
"kind": "space"
},
{
"text": "a string",
"kind": "text"
}
]
}
]
}
],
"applicableSpan": {
"start": 351,
"length": 7
},
"selectedItemIndex": 0,
"argumentIndex": 0,
"argumentCount": 1
}
}
]