From 833d34e491d0f8d23f7cc0f3d5b0c05108c15603 Mon Sep 17 00:00:00 2001 From: hantatsang Date: Fri, 26 Mar 2021 21:24:07 +1100 Subject: [PATCH 01/14] feat(services): jsdoc use custom name for display parts --- src/services/jsDoc.ts | 48 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/src/services/jsDoc.ts b/src/services/jsDoc.ts index 35694333b51f5..55051b9e7f67d 100644 --- a/src/services/jsDoc.ts +++ b/src/services/jsDoc.ts @@ -79,6 +79,46 @@ namespace ts.JsDoc { "virtual", "yields" ]; + const jsDocTagCustomNamesDict: Record = { + access: "accessLevel", + abstract: "abstractMember", + argument: "argumentName", + async: "asynchronous", + callback: "callbackFunction", + classdesc: "classDescription", + constructor: "constructor", + default: "defaultValue", + emits: "emitsEvent", + file: "fileOverview", + fileoverview: "fileOverview", + fires: "firesEvent", + generator: "generatorFunction", + hideconstructor: "hideConstructor", + host: "external", + ignore: "ignoredInDocumentation", + inheritdoc: "inheritDocumentation", + inner: "innerObject", + instance: "instanceMember", + kind: "symbolKind", + lends: "lendsAsMembersOfSymbol", + memberof: "memberOf", + package: "packagePrivate", + param: "parameterName", + protected: "protectedSymbol", + returns: "returnsValue", + since: "addedSince", + static: "staticMember", + template: "genericTypeName", + this: "typeOfThis", + throws: "throwException", + todo: "toDo", + tutorial: "tutorialLink", + type: "typeName", + typedef: "typeDefinition", + var: "variation", // TODO: is this correct? + virtual: "virtualMember", + yields: "yieldsValue" + }; let jsDocTagNameCompletionEntries: CompletionEntry[]; let jsDocTagCompletionEntries: CompletionEntry[]; @@ -124,12 +164,18 @@ namespace ts.JsDoc { const tags: JSDocTagInfo[] = []; forEachUnique(declarations, declaration => { for (const tag of getJSDocTags(declaration)) { - tags.push({ name: tag.tagName.text, text: getCommentDisplayParts(tag, checker) }); + tags.push({ name: getCustomTagName(tag.tagName.text), text: getCommentDisplayParts(tag, checker) }); } }); return tags; } + function getCustomTagName(tagNameText: string): string { + return tagNameText in jsDocTagCustomNamesDict + ? jsDocTagCustomNamesDict[tagNameText] + : tagNameText; + } + function getDisplayPartsFromComment(comment: string | readonly (JSDocText | JSDocLink)[], checker: TypeChecker | undefined): SymbolDisplayPart[] { if (typeof comment === "string") { return [textPart(comment)]; From cfe15483204be13941436bcd3022a93ac34841fe Mon Sep 17 00:00:00 2001 From: hantatsang Date: Fri, 26 Mar 2021 21:33:38 +1100 Subject: [PATCH 02/14] fix(services): jsdoc typo --- src/services/jsDoc.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/jsDoc.ts b/src/services/jsDoc.ts index 55051b9e7f67d..7f877e50af49a 100644 --- a/src/services/jsDoc.ts +++ b/src/services/jsDoc.ts @@ -110,7 +110,7 @@ namespace ts.JsDoc { static: "staticMember", template: "genericTypeName", this: "typeOfThis", - throws: "throwException", + throws: "throwsException", todo: "toDo", tutorial: "tutorialLink", type: "typeName", From f50a9489def37eb80103bca38c838ae9093e2459 Mon Sep 17 00:00:00 2001 From: hantatsang Date: Sat, 27 Mar 2021 08:04:27 +1100 Subject: [PATCH 03/14] feat(services): revert jsDoc changes --- src/services/jsDoc.ts | 48 +------------------------------------------ 1 file changed, 1 insertion(+), 47 deletions(-) diff --git a/src/services/jsDoc.ts b/src/services/jsDoc.ts index 7f877e50af49a..35694333b51f5 100644 --- a/src/services/jsDoc.ts +++ b/src/services/jsDoc.ts @@ -79,46 +79,6 @@ namespace ts.JsDoc { "virtual", "yields" ]; - const jsDocTagCustomNamesDict: Record = { - access: "accessLevel", - abstract: "abstractMember", - argument: "argumentName", - async: "asynchronous", - callback: "callbackFunction", - classdesc: "classDescription", - constructor: "constructor", - default: "defaultValue", - emits: "emitsEvent", - file: "fileOverview", - fileoverview: "fileOverview", - fires: "firesEvent", - generator: "generatorFunction", - hideconstructor: "hideConstructor", - host: "external", - ignore: "ignoredInDocumentation", - inheritdoc: "inheritDocumentation", - inner: "innerObject", - instance: "instanceMember", - kind: "symbolKind", - lends: "lendsAsMembersOfSymbol", - memberof: "memberOf", - package: "packagePrivate", - param: "parameterName", - protected: "protectedSymbol", - returns: "returnsValue", - since: "addedSince", - static: "staticMember", - template: "genericTypeName", - this: "typeOfThis", - throws: "throwsException", - todo: "toDo", - tutorial: "tutorialLink", - type: "typeName", - typedef: "typeDefinition", - var: "variation", // TODO: is this correct? - virtual: "virtualMember", - yields: "yieldsValue" - }; let jsDocTagNameCompletionEntries: CompletionEntry[]; let jsDocTagCompletionEntries: CompletionEntry[]; @@ -164,18 +124,12 @@ namespace ts.JsDoc { const tags: JSDocTagInfo[] = []; forEachUnique(declarations, declaration => { for (const tag of getJSDocTags(declaration)) { - tags.push({ name: getCustomTagName(tag.tagName.text), text: getCommentDisplayParts(tag, checker) }); + tags.push({ name: tag.tagName.text, text: getCommentDisplayParts(tag, checker) }); } }); return tags; } - function getCustomTagName(tagNameText: string): string { - return tagNameText in jsDocTagCustomNamesDict - ? jsDocTagCustomNamesDict[tagNameText] - : tagNameText; - } - function getDisplayPartsFromComment(comment: string | readonly (JSDocText | JSDocLink)[], checker: TypeChecker | undefined): SymbolDisplayPart[] { if (typeof comment === "string") { return [textPart(comment)]; From d8fae422755e3753c7aef9a53c56f8cacee0e4ed Mon Sep 17 00:00:00 2001 From: hantatsang Date: Sat, 27 Mar 2021 21:24:16 +1100 Subject: [PATCH 04/14] feat(services): jsdoc improve displayparts with more comment kinds Improve rendering of JSDoc comment text with displayparts for: - `@typedef` - `@callback` - `@param` - `@property` --- src/services/jsDoc.ts | 24 ++++++++++++++++++------ src/services/types.ts | 2 ++ src/services/utilities.ts | 25 +++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 6 deletions(-) diff --git a/src/services/jsDoc.ts b/src/services/jsDoc.ts index 35694333b51f5..7cb8868af4bc7 100644 --- a/src/services/jsDoc.ts +++ b/src/services/jsDoc.ts @@ -79,6 +79,12 @@ namespace ts.JsDoc { "virtual", "yields" ]; + const syntaxKindDisplayPartFunctionDict: Partial> = { + [SyntaxKind.JSDocTypedefTag]: typeDefinitionNamePart, + [SyntaxKind.JSDocCallbackTag]: callbackFunctionNamePart, + [SyntaxKind.JSDocPropertyTag]: propertyNamePart, + [SyntaxKind.JSDocParameterTag]: parameterNamePart, + }; let jsDocTagNameCompletionEntries: CompletionEntry[]; let jsDocTagCompletionEntries: CompletionEntry[]; @@ -156,18 +162,24 @@ namespace ts.JsDoc { case SyntaxKind.JSDocPropertyTag: case SyntaxKind.JSDocParameterTag: case SyntaxKind.JSDocSeeTag: - const { name } = tag as JSDocTypedefTag | JSDocPropertyTag | JSDocParameterTag | JSDocSeeTag; - return name ? withNode(name) : comment === undefined ? undefined : getDisplayPartsFromComment(comment, checker); + const { name } = tag as JSDocCallbackTag | JSDocTypedefTag | JSDocPropertyTag | JSDocParameterTag | JSDocSeeTag; + return name + ? withNode(name, syntaxKindDisplayPartFunctionDict[tag.kind]) + : comment === undefined + ? undefined + : getDisplayPartsFromComment(comment, checker); default: return comment === undefined ? undefined : getDisplayPartsFromComment(comment, checker); } - function withNode(node: Node) { - return addComment(node.getText()); + function withNode(node: Node, constructDisplayPartFunc?: ConstructSpecificDisplayPartFunction) { + return addComment(node.getText(), constructDisplayPartFunc); } - function addComment(s: string) { - return comment ? [textPart(s), spacePart(), ...getDisplayPartsFromComment(comment, checker)] : [textPart(s)]; + function addComment(s: string, constructDisplayPartFunc?: ConstructSpecificDisplayPartFunction) { + return comment + ? [!!constructDisplayPartFunc ? constructDisplayPartFunc(s) : textPart(s), spacePart(), ...getDisplayPartsFromComment(comment, checker)] + : [textPart(s)]; } } diff --git a/src/services/types.ts b/src/services/types.ts index 724ffef43e10d..a967b70053bb0 100644 --- a/src/services/types.ts +++ b/src/services/types.ts @@ -1011,6 +1011,7 @@ namespace ts { export enum SymbolDisplayPartKind { aliasName, + callbackFunctionName, className, enumName, fieldName, @@ -1028,6 +1029,7 @@ namespace ts { punctuation, space, text, + typeDefinitionName, typeParameterName, enumMemberName, functionName, diff --git a/src/services/utilities.ts b/src/services/utilities.ts index 3fb677efd00c6..0b7087605fea3 100644 --- a/src/services/utilities.ts +++ b/src/services/utilities.ts @@ -2156,6 +2156,15 @@ namespace ts { return { text, kind: SymbolDisplayPartKind[kind] }; } + /** + * Functions that call displayPart with specific `SymbolDisplayPartKind` + */ + export type ConstructSpecificDisplayPartFunction = (text: string) => ReturnType; + + export function callbackFunctionNamePart(text: string) { + return displayPart(text, SymbolDisplayPartKind.callbackFunctionName); + } + export function spacePart() { return displayPart(" ", SymbolDisplayPartKind.space); } @@ -2172,6 +2181,14 @@ namespace ts { return displayPart(tokenToString(kind)!, SymbolDisplayPartKind.operator); } + export function parameterNamePart(text: string) { + return displayPart(text, SymbolDisplayPartKind.parameterName); + } + + export function propertyNamePart(text: string) { + return displayPart(text, SymbolDisplayPartKind.propertyName); + } + export function textOrKeywordPart(text: string) { const kind = stringToToken(text); return kind === undefined @@ -2183,6 +2200,14 @@ namespace ts { return displayPart(text, SymbolDisplayPartKind.text); } + export function typeDefinitionNamePart(text: string) { + return displayPart(text, SymbolDisplayPartKind.typeDefinitionName); + } + + export function typeParameterNamePart(text: string) { + return displayPart(text, SymbolDisplayPartKind.typeParameterName); + } + export function linkTextPart(text: string) { return displayPart(text, SymbolDisplayPartKind.linkText); } From 0b04d1c627156583b4d0f859492c153d0b591557 Mon Sep 17 00:00:00 2001 From: hantatsang Date: Sat, 27 Mar 2021 21:35:59 +1100 Subject: [PATCH 05/14] feat(services): jsdoc improve displayparts for template --- src/services/jsDoc.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/services/jsDoc.ts b/src/services/jsDoc.ts index 7cb8868af4bc7..298a6ab0560e7 100644 --- a/src/services/jsDoc.ts +++ b/src/services/jsDoc.ts @@ -80,10 +80,10 @@ namespace ts.JsDoc { "yields" ]; const syntaxKindDisplayPartFunctionDict: Partial> = { - [SyntaxKind.JSDocTypedefTag]: typeDefinitionNamePart, [SyntaxKind.JSDocCallbackTag]: callbackFunctionNamePart, - [SyntaxKind.JSDocPropertyTag]: propertyNamePart, [SyntaxKind.JSDocParameterTag]: parameterNamePart, + [SyntaxKind.JSDocPropertyTag]: propertyNamePart, + [SyntaxKind.JSDocTypedefTag]: typeDefinitionNamePart, }; let jsDocTagNameCompletionEntries: CompletionEntry[]; let jsDocTagCompletionEntries: CompletionEntry[]; @@ -147,14 +147,14 @@ namespace ts.JsDoc { } function getCommentDisplayParts(tag: JSDocTag, checker?: TypeChecker): SymbolDisplayPart[] | undefined { - const { comment } = tag; - switch (tag.kind) { + const { comment, kind } = tag; + switch (kind) { case SyntaxKind.JSDocImplementsTag: return withNode((tag as JSDocImplementsTag).class); case SyntaxKind.JSDocAugmentsTag: return withNode((tag as JSDocAugmentsTag).class); case SyntaxKind.JSDocTemplateTag: - return addComment((tag as JSDocTemplateTag).typeParameters.map(tp => tp.getText()).join(", ")); + return addComment((tag as JSDocTemplateTag).typeParameters.map(tp => tp.getText()).join(", "), typeParameterNamePart); case SyntaxKind.JSDocTypeTag: return withNode((tag as JSDocTypeTag).typeExpression); case SyntaxKind.JSDocTypedefTag: @@ -164,7 +164,7 @@ namespace ts.JsDoc { case SyntaxKind.JSDocSeeTag: const { name } = tag as JSDocCallbackTag | JSDocTypedefTag | JSDocPropertyTag | JSDocParameterTag | JSDocSeeTag; return name - ? withNode(name, syntaxKindDisplayPartFunctionDict[tag.kind]) + ? withNode(name, syntaxKindDisplayPartFunctionDict[kind]) : comment === undefined ? undefined : getDisplayPartsFromComment(comment, checker); From e4617c3fca4fb74cec65da261b7ccc487cc4f295 Mon Sep 17 00:00:00 2001 From: hantatsang Date: Sat, 27 Mar 2021 21:50:03 +1100 Subject: [PATCH 06/14] test: accept baseline --- .../reference/api/tsserverlibrary.d.ts | 50 +- tests/baselines/reference/api/typescript.d.ts | 50 +- .../completionEntryForUnionMethod.baseline | 72 +-- .../completionsCommentsClass.baseline | 24 +- .../completionsCommentsClassMembers.baseline | 194 ++++---- ...completionsCommentsCommentParsing.baseline | 448 +++++++++--------- ...etionsCommentsFunctionDeclaration.baseline | 78 +-- ...letionsCommentsFunctionExpression.baseline | 112 ++--- ...hodsOnAssignedFunctionExpressions.baseline | 2 +- .../jsDocFunctionSignatures5.baseline | 8 +- .../jsDocFunctionSignatures6.baseline | 32 +- .../quickInfoCommentsClassMembers.baseline | 6 +- .../quickInfoCommentsCommentParsing.baseline | 78 +-- ...ickInfoCommentsFunctionExpression.baseline | 16 +- .../reference/quickInfoJSDocTags.baseline | 2 +- .../reference/quickInfoJsDocTags1.baseline | 4 +- .../reference/quickInfoJsDocTags3.baseline | 4 +- .../reference/quickInfoJsDocTags4.baseline | 4 +- .../reference/quickInfoJsDocTags5.baseline | 4 +- .../reference/quickInfoJsDocTags6.baseline | 4 +- .../quickInfoJsDocTextFormatting1.baseline | 20 +- .../signatureHelpCommentsClass.baseline | 2 +- ...gnatureHelpCommentsCommentParsing.baseline | 144 +++--- ...reHelpCommentsFunctionDeclaration.baseline | 2 +- ...ureHelpCommentsFunctionExpression.baseline | 4 +- ...elpConstructorCallParamProperties.baseline | 2 +- ...natureHelpJSMissingPropertyAccess.baseline | 8 +- .../signatureHelpTypeArguments2.baseline | 32 +- .../signatureHelpWithUnknown.baseline | 2 +- .../trailingCommaSignatureHelp.baseline | 2 +- 30 files changed, 707 insertions(+), 703 deletions(-) diff --git a/tests/baselines/reference/api/tsserverlibrary.d.ts b/tests/baselines/reference/api/tsserverlibrary.d.ts index a2ff8fc1ea29a..c30b525ad658d 100644 --- a/tests/baselines/reference/api/tsserverlibrary.d.ts +++ b/tests/baselines/reference/api/tsserverlibrary.d.ts @@ -6035,30 +6035,32 @@ declare namespace ts { } enum SymbolDisplayPartKind { aliasName = 0, - className = 1, - enumName = 2, - fieldName = 3, - interfaceName = 4, - keyword = 5, - lineBreak = 6, - numericLiteral = 7, - stringLiteral = 8, - localName = 9, - methodName = 10, - moduleName = 11, - operator = 12, - parameterName = 13, - propertyName = 14, - punctuation = 15, - space = 16, - text = 17, - typeParameterName = 18, - enumMemberName = 19, - functionName = 20, - regularExpressionLiteral = 21, - link = 22, - linkName = 23, - linkText = 24 + callbackFunctionName = 1, + className = 2, + enumName = 3, + fieldName = 4, + interfaceName = 5, + keyword = 6, + lineBreak = 7, + numericLiteral = 8, + stringLiteral = 9, + localName = 10, + methodName = 11, + moduleName = 12, + operator = 13, + parameterName = 14, + propertyName = 15, + punctuation = 16, + space = 17, + text = 18, + typeDefinitionName = 19, + typeParameterName = 20, + enumMemberName = 21, + functionName = 22, + regularExpressionLiteral = 23, + link = 24, + linkName = 25, + linkText = 26 } interface SymbolDisplayPart { text: string; diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index 0b2d291eeddb5..839c518de7fad 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -6035,30 +6035,32 @@ declare namespace ts { } enum SymbolDisplayPartKind { aliasName = 0, - className = 1, - enumName = 2, - fieldName = 3, - interfaceName = 4, - keyword = 5, - lineBreak = 6, - numericLiteral = 7, - stringLiteral = 8, - localName = 9, - methodName = 10, - moduleName = 11, - operator = 12, - parameterName = 13, - propertyName = 14, - punctuation = 15, - space = 16, - text = 17, - typeParameterName = 18, - enumMemberName = 19, - functionName = 20, - regularExpressionLiteral = 21, - link = 22, - linkName = 23, - linkText = 24 + callbackFunctionName = 1, + className = 2, + enumName = 3, + fieldName = 4, + interfaceName = 5, + keyword = 6, + lineBreak = 7, + numericLiteral = 8, + stringLiteral = 9, + localName = 10, + methodName = 11, + moduleName = 12, + operator = 13, + parameterName = 14, + propertyName = 15, + punctuation = 16, + space = 17, + text = 18, + typeDefinitionName = 19, + typeParameterName = 20, + enumMemberName = 21, + functionName = 22, + regularExpressionLiteral = 23, + link = 24, + linkName = 25, + linkText = 26 } interface SymbolDisplayPart { text: string; diff --git a/tests/baselines/reference/completionEntryForUnionMethod.baseline b/tests/baselines/reference/completionEntryForUnionMethod.baseline index ce000ec6ddbcb..696fb676a26d9 100644 --- a/tests/baselines/reference/completionEntryForUnionMethod.baseline +++ b/tests/baselines/reference/completionEntryForUnionMethod.baseline @@ -421,7 +421,7 @@ "text": [ { "text": "items", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -906,7 +906,7 @@ "text": [ { "text": "items", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -923,7 +923,7 @@ "text": [ { "text": "items", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -1036,7 +1036,7 @@ "text": [ { "text": "separator", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -1405,7 +1405,7 @@ "text": [ { "text": "start", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -1422,7 +1422,7 @@ "text": [ { "text": "end", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -1715,7 +1715,7 @@ "text": [ { "text": "compareFn", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -1912,7 +1912,7 @@ "text": [ { "text": "start", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -1929,7 +1929,7 @@ "text": [ { "text": "deleteCount", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -2055,7 +2055,7 @@ "text": [ { "text": "items", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -2188,7 +2188,7 @@ "text": [ { "text": "searchElement", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -2205,7 +2205,7 @@ "text": [ { "text": "fromIndex", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -2338,7 +2338,7 @@ "text": [ { "text": "searchElement", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -2355,7 +2355,7 @@ "text": [ { "text": "fromIndex", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -2892,7 +2892,7 @@ "text": [ { "text": "predicate", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -2909,7 +2909,7 @@ "text": [ { "text": "thisArg", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -2926,7 +2926,7 @@ "text": [ { "text": "predicate", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -2943,7 +2943,7 @@ "text": [ { "text": "thisArg", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -3292,7 +3292,7 @@ "text": [ { "text": "predicate", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -3309,7 +3309,7 @@ "text": [ { "text": "thisArg", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -3658,7 +3658,7 @@ "text": [ { "text": "callbackfn", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -3675,7 +3675,7 @@ "text": [ { "text": "thisArg", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -4044,7 +4044,7 @@ "text": [ { "text": "callbackfn", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -4061,7 +4061,7 @@ "text": [ { "text": "thisArg", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -4590,7 +4590,7 @@ "text": [ { "text": "predicate", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -4607,7 +4607,7 @@ "text": [ { "text": "thisArg", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -4624,7 +4624,7 @@ "text": [ { "text": "predicate", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -4641,7 +4641,7 @@ "text": [ { "text": "thisArg", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -5326,7 +5326,7 @@ "text": [ { "text": "callbackfn", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -5343,7 +5343,7 @@ "text": [ { "text": "initialValue", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -5360,7 +5360,7 @@ "text": [ { "text": "callbackfn", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -5377,7 +5377,7 @@ "text": [ { "text": "initialValue", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -6062,7 +6062,7 @@ "text": [ { "text": "callbackfn", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -6079,7 +6079,7 @@ "text": [ { "text": "initialValue", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -6096,7 +6096,7 @@ "text": [ { "text": "callbackfn", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -6113,7 +6113,7 @@ "text": [ { "text": "initialValue", - "kind": "text" + "kind": "parameterName" }, { "text": " ", diff --git a/tests/baselines/reference/completionsCommentsClass.baseline b/tests/baselines/reference/completionsCommentsClass.baseline index f971b3ca6153a..9272bea49cbf5 100644 --- a/tests/baselines/reference/completionsCommentsClass.baseline +++ b/tests/baselines/reference/completionsCommentsClass.baseline @@ -98,7 +98,7 @@ "text": [ { "text": "x", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -207,7 +207,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -224,7 +224,7 @@ "text": [ { "text": "radix", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -305,7 +305,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -386,7 +386,7 @@ "text": [ { "text": "number", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -467,7 +467,7 @@ "text": [ { "text": "number", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -548,7 +548,7 @@ "text": [ { "text": "encodedURI", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -629,7 +629,7 @@ "text": [ { "text": "encodedURIComponent", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -710,7 +710,7 @@ "text": [ { "text": "uri", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -823,7 +823,7 @@ "text": [ { "text": "uriComponent", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -904,7 +904,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -985,7 +985,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", diff --git a/tests/baselines/reference/completionsCommentsClassMembers.baseline b/tests/baselines/reference/completionsCommentsClassMembers.baseline index b4a228a035f69..1f671169aed80 100644 --- a/tests/baselines/reference/completionsCommentsClassMembers.baseline +++ b/tests/baselines/reference/completionsCommentsClassMembers.baseline @@ -9037,7 +9037,7 @@ "text": [ { "text": "x", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -9146,7 +9146,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -9163,7 +9163,7 @@ "text": [ { "text": "radix", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -9244,7 +9244,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -9325,7 +9325,7 @@ "text": [ { "text": "number", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -9406,7 +9406,7 @@ "text": [ { "text": "number", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -9487,7 +9487,7 @@ "text": [ { "text": "encodedURI", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -9568,7 +9568,7 @@ "text": [ { "text": "encodedURIComponent", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -9649,7 +9649,7 @@ "text": [ { "text": "uri", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -9762,7 +9762,7 @@ "text": [ { "text": "uriComponent", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -9843,7 +9843,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -9924,7 +9924,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -14183,7 +14183,7 @@ "text": [ { "text": "x", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -14292,7 +14292,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -14309,7 +14309,7 @@ "text": [ { "text": "radix", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -14390,7 +14390,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -14471,7 +14471,7 @@ "text": [ { "text": "number", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -14552,7 +14552,7 @@ "text": [ { "text": "number", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -14633,7 +14633,7 @@ "text": [ { "text": "encodedURI", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -14714,7 +14714,7 @@ "text": [ { "text": "encodedURIComponent", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -14795,7 +14795,7 @@ "text": [ { "text": "uri", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -14908,7 +14908,7 @@ "text": [ { "text": "uriComponent", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -14989,7 +14989,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -15070,7 +15070,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -22737,7 +22737,7 @@ "text": [ { "text": "x", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -22846,7 +22846,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -22863,7 +22863,7 @@ "text": [ { "text": "radix", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -22944,7 +22944,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -23025,7 +23025,7 @@ "text": [ { "text": "number", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -23106,7 +23106,7 @@ "text": [ { "text": "number", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -23187,7 +23187,7 @@ "text": [ { "text": "encodedURI", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -23268,7 +23268,7 @@ "text": [ { "text": "encodedURIComponent", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -23349,7 +23349,7 @@ "text": [ { "text": "uri", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -23462,7 +23462,7 @@ "text": [ { "text": "uriComponent", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -23543,7 +23543,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -23624,7 +23624,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -26743,7 +26743,7 @@ "text": [ { "text": "x", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -26852,7 +26852,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -26869,7 +26869,7 @@ "text": [ { "text": "radix", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -26950,7 +26950,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -27031,7 +27031,7 @@ "text": [ { "text": "number", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -27112,7 +27112,7 @@ "text": [ { "text": "number", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -27193,7 +27193,7 @@ "text": [ { "text": "encodedURI", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -27274,7 +27274,7 @@ "text": [ { "text": "encodedURIComponent", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -27355,7 +27355,7 @@ "text": [ { "text": "uri", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -27468,7 +27468,7 @@ "text": [ { "text": "uriComponent", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -27549,7 +27549,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -27630,7 +27630,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -30749,7 +30749,7 @@ "text": [ { "text": "x", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -30858,7 +30858,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -30875,7 +30875,7 @@ "text": [ { "text": "radix", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -30956,7 +30956,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -31037,7 +31037,7 @@ "text": [ { "text": "number", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -31118,7 +31118,7 @@ "text": [ { "text": "number", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -31199,7 +31199,7 @@ "text": [ { "text": "encodedURI", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -31280,7 +31280,7 @@ "text": [ { "text": "encodedURIComponent", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -31361,7 +31361,7 @@ "text": [ { "text": "uri", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -31474,7 +31474,7 @@ "text": [ { "text": "uriComponent", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -31555,7 +31555,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -31636,7 +31636,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -34755,7 +34755,7 @@ "text": [ { "text": "x", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -34864,7 +34864,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -34881,7 +34881,7 @@ "text": [ { "text": "radix", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -34962,7 +34962,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -35043,7 +35043,7 @@ "text": [ { "text": "number", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -35124,7 +35124,7 @@ "text": [ { "text": "number", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -35205,7 +35205,7 @@ "text": [ { "text": "encodedURI", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -35286,7 +35286,7 @@ "text": [ { "text": "encodedURIComponent", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -35367,7 +35367,7 @@ "text": [ { "text": "uri", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -35480,7 +35480,7 @@ "text": [ { "text": "uriComponent", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -35561,7 +35561,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -35642,7 +35642,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -38761,7 +38761,7 @@ "text": [ { "text": "x", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -38870,7 +38870,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -38887,7 +38887,7 @@ "text": [ { "text": "radix", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -38968,7 +38968,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -39049,7 +39049,7 @@ "text": [ { "text": "number", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -39130,7 +39130,7 @@ "text": [ { "text": "number", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -39211,7 +39211,7 @@ "text": [ { "text": "encodedURI", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -39292,7 +39292,7 @@ "text": [ { "text": "encodedURIComponent", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -39373,7 +39373,7 @@ "text": [ { "text": "uri", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -39486,7 +39486,7 @@ "text": [ { "text": "uriComponent", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -39567,7 +39567,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -39648,7 +39648,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -42767,7 +42767,7 @@ "text": [ { "text": "x", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -42876,7 +42876,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -42893,7 +42893,7 @@ "text": [ { "text": "radix", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -42974,7 +42974,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -43055,7 +43055,7 @@ "text": [ { "text": "number", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -43136,7 +43136,7 @@ "text": [ { "text": "number", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -43217,7 +43217,7 @@ "text": [ { "text": "encodedURI", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -43298,7 +43298,7 @@ "text": [ { "text": "encodedURIComponent", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -43379,7 +43379,7 @@ "text": [ { "text": "uri", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -43492,7 +43492,7 @@ "text": [ { "text": "uriComponent", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -43573,7 +43573,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -43654,7 +43654,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -50173,7 +50173,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", diff --git a/tests/baselines/reference/completionsCommentsCommentParsing.baseline b/tests/baselines/reference/completionsCommentsCommentParsing.baseline index b077103c369bb..e14a8c87af2a0 100644 --- a/tests/baselines/reference/completionsCommentsCommentParsing.baseline +++ b/tests/baselines/reference/completionsCommentsCommentParsing.baseline @@ -98,7 +98,7 @@ "text": [ { "text": "x", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -207,7 +207,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -224,7 +224,7 @@ "text": [ { "text": "radix", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -305,7 +305,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -386,7 +386,7 @@ "text": [ { "text": "number", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -467,7 +467,7 @@ "text": [ { "text": "number", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -548,7 +548,7 @@ "text": [ { "text": "encodedURI", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -629,7 +629,7 @@ "text": [ { "text": "encodedURIComponent", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -710,7 +710,7 @@ "text": [ { "text": "uri", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -823,7 +823,7 @@ "text": [ { "text": "uriComponent", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -904,7 +904,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -985,7 +985,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -3265,7 +3265,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -3282,7 +3282,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -3480,7 +3480,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -3527,7 +3527,7 @@ "text": [ { "text": "e", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -3639,7 +3639,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -3945,7 +3945,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -3962,7 +3962,7 @@ "text": [ { "text": "c", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -3979,7 +3979,7 @@ "text": [ { "text": "d", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -3996,7 +3996,7 @@ "text": [ { "text": "e", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -4013,7 +4013,7 @@ "text": [ { "text": "", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -4103,7 +4103,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -4217,7 +4217,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -4243,7 +4243,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -4348,7 +4348,7 @@ "text": [ { "text": "foo", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -4365,7 +4365,7 @@ "text": [ { "text": "bar", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -4518,7 +4518,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -4535,7 +4535,7 @@ "text": [ { "text": "c", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -4756,7 +4756,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -4773,7 +4773,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -4790,7 +4790,7 @@ "text": [ { "text": "c", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -5790,7 +5790,7 @@ "text": [ { "text": "x", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -5899,7 +5899,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -5916,7 +5916,7 @@ "text": [ { "text": "radix", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -5997,7 +5997,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -6078,7 +6078,7 @@ "text": [ { "text": "number", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -6159,7 +6159,7 @@ "text": [ { "text": "number", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -6240,7 +6240,7 @@ "text": [ { "text": "encodedURI", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -6321,7 +6321,7 @@ "text": [ { "text": "encodedURIComponent", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -6402,7 +6402,7 @@ "text": [ { "text": "uri", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -6515,7 +6515,7 @@ "text": [ { "text": "uriComponent", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -6596,7 +6596,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -6677,7 +6677,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -9924,7 +9924,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -9941,7 +9941,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -10139,7 +10139,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -10186,7 +10186,7 @@ "text": [ { "text": "e", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -10298,7 +10298,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -10604,7 +10604,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -10621,7 +10621,7 @@ "text": [ { "text": "c", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -10638,7 +10638,7 @@ "text": [ { "text": "d", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -10655,7 +10655,7 @@ "text": [ { "text": "e", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -10672,7 +10672,7 @@ "text": [ { "text": "", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -10762,7 +10762,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -10876,7 +10876,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -10902,7 +10902,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -11007,7 +11007,7 @@ "text": [ { "text": "foo", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -11024,7 +11024,7 @@ "text": [ { "text": "bar", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -11177,7 +11177,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -11194,7 +11194,7 @@ "text": [ { "text": "c", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -11415,7 +11415,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -11432,7 +11432,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -11449,7 +11449,7 @@ "text": [ { "text": "c", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -12215,7 +12215,7 @@ "text": [ { "text": "x", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -12324,7 +12324,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -12341,7 +12341,7 @@ "text": [ { "text": "radix", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -12422,7 +12422,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -12503,7 +12503,7 @@ "text": [ { "text": "number", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -12584,7 +12584,7 @@ "text": [ { "text": "number", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -12665,7 +12665,7 @@ "text": [ { "text": "encodedURI", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -12746,7 +12746,7 @@ "text": [ { "text": "encodedURIComponent", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -12827,7 +12827,7 @@ "text": [ { "text": "uri", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -12940,7 +12940,7 @@ "text": [ { "text": "uriComponent", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -13021,7 +13021,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -13102,7 +13102,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -15382,7 +15382,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -15399,7 +15399,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -15597,7 +15597,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -15644,7 +15644,7 @@ "text": [ { "text": "e", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -15756,7 +15756,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -16062,7 +16062,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -16079,7 +16079,7 @@ "text": [ { "text": "c", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -16096,7 +16096,7 @@ "text": [ { "text": "d", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -16113,7 +16113,7 @@ "text": [ { "text": "e", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -16130,7 +16130,7 @@ "text": [ { "text": "", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -16220,7 +16220,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -16334,7 +16334,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -16360,7 +16360,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -16465,7 +16465,7 @@ "text": [ { "text": "foo", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -16482,7 +16482,7 @@ "text": [ { "text": "bar", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -16635,7 +16635,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -16652,7 +16652,7 @@ "text": [ { "text": "c", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -16873,7 +16873,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -16890,7 +16890,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -16907,7 +16907,7 @@ "text": [ { "text": "c", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -17691,7 +17691,7 @@ "text": [ { "text": "x", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -17800,7 +17800,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -17817,7 +17817,7 @@ "text": [ { "text": "radix", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -17898,7 +17898,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -17979,7 +17979,7 @@ "text": [ { "text": "number", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -18060,7 +18060,7 @@ "text": [ { "text": "number", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -18141,7 +18141,7 @@ "text": [ { "text": "encodedURI", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -18222,7 +18222,7 @@ "text": [ { "text": "encodedURIComponent", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -18303,7 +18303,7 @@ "text": [ { "text": "uri", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -18416,7 +18416,7 @@ "text": [ { "text": "uriComponent", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -18497,7 +18497,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -18578,7 +18578,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -20858,7 +20858,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -20875,7 +20875,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -21073,7 +21073,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -21120,7 +21120,7 @@ "text": [ { "text": "e", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -21232,7 +21232,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -21538,7 +21538,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -21555,7 +21555,7 @@ "text": [ { "text": "c", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -21572,7 +21572,7 @@ "text": [ { "text": "d", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -21589,7 +21589,7 @@ "text": [ { "text": "e", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -21606,7 +21606,7 @@ "text": [ { "text": "", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -21696,7 +21696,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -21810,7 +21810,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -21836,7 +21836,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -21941,7 +21941,7 @@ "text": [ { "text": "foo", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -21958,7 +21958,7 @@ "text": [ { "text": "bar", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -22111,7 +22111,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -22128,7 +22128,7 @@ "text": [ { "text": "c", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -22349,7 +22349,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -22366,7 +22366,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -22383,7 +22383,7 @@ "text": [ { "text": "c", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -23145,7 +23145,7 @@ "text": [ { "text": "x", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -23254,7 +23254,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -23271,7 +23271,7 @@ "text": [ { "text": "radix", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -23352,7 +23352,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -23433,7 +23433,7 @@ "text": [ { "text": "number", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -23514,7 +23514,7 @@ "text": [ { "text": "number", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -23595,7 +23595,7 @@ "text": [ { "text": "encodedURI", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -23676,7 +23676,7 @@ "text": [ { "text": "encodedURIComponent", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -23757,7 +23757,7 @@ "text": [ { "text": "uri", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -23870,7 +23870,7 @@ "text": [ { "text": "uriComponent", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -23951,7 +23951,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -24032,7 +24032,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -26312,7 +26312,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -26329,7 +26329,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -26527,7 +26527,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -26574,7 +26574,7 @@ "text": [ { "text": "e", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -26686,7 +26686,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -26992,7 +26992,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -27009,7 +27009,7 @@ "text": [ { "text": "c", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -27026,7 +27026,7 @@ "text": [ { "text": "d", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -27043,7 +27043,7 @@ "text": [ { "text": "e", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -27060,7 +27060,7 @@ "text": [ { "text": "", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -27150,7 +27150,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -27264,7 +27264,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -27290,7 +27290,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -27395,7 +27395,7 @@ "text": [ { "text": "foo", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -27412,7 +27412,7 @@ "text": [ { "text": "bar", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -27565,7 +27565,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -27582,7 +27582,7 @@ "text": [ { "text": "c", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -27803,7 +27803,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -27820,7 +27820,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -27837,7 +27837,7 @@ "text": [ { "text": "c", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -28849,7 +28849,7 @@ "text": [ { "text": "x", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -28958,7 +28958,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -28975,7 +28975,7 @@ "text": [ { "text": "radix", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -29056,7 +29056,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -29137,7 +29137,7 @@ "text": [ { "text": "number", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -29218,7 +29218,7 @@ "text": [ { "text": "number", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -29299,7 +29299,7 @@ "text": [ { "text": "encodedURI", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -29380,7 +29380,7 @@ "text": [ { "text": "encodedURIComponent", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -29461,7 +29461,7 @@ "text": [ { "text": "uri", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -29574,7 +29574,7 @@ "text": [ { "text": "uriComponent", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -29655,7 +29655,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -29736,7 +29736,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -32983,7 +32983,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -33000,7 +33000,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -33198,7 +33198,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -33245,7 +33245,7 @@ "text": [ { "text": "e", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -33357,7 +33357,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -33663,7 +33663,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -33680,7 +33680,7 @@ "text": [ { "text": "c", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -33697,7 +33697,7 @@ "text": [ { "text": "d", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -33714,7 +33714,7 @@ "text": [ { "text": "e", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -33731,7 +33731,7 @@ "text": [ { "text": "", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -33821,7 +33821,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -33935,7 +33935,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -33961,7 +33961,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -34066,7 +34066,7 @@ "text": [ { "text": "foo", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -34083,7 +34083,7 @@ "text": [ { "text": "bar", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -34236,7 +34236,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -34253,7 +34253,7 @@ "text": [ { "text": "c", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -34474,7 +34474,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -34491,7 +34491,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -34508,7 +34508,7 @@ "text": [ { "text": "c", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -35274,7 +35274,7 @@ "text": [ { "text": "x", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -35383,7 +35383,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -35400,7 +35400,7 @@ "text": [ { "text": "radix", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -35481,7 +35481,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -35562,7 +35562,7 @@ "text": [ { "text": "number", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -35643,7 +35643,7 @@ "text": [ { "text": "number", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -35724,7 +35724,7 @@ "text": [ { "text": "encodedURI", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -35805,7 +35805,7 @@ "text": [ { "text": "encodedURIComponent", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -35886,7 +35886,7 @@ "text": [ { "text": "uri", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -35999,7 +35999,7 @@ "text": [ { "text": "uriComponent", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -36080,7 +36080,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -36161,7 +36161,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -38441,7 +38441,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -38458,7 +38458,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -38656,7 +38656,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -38703,7 +38703,7 @@ "text": [ { "text": "e", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -38815,7 +38815,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -39121,7 +39121,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -39138,7 +39138,7 @@ "text": [ { "text": "c", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -39155,7 +39155,7 @@ "text": [ { "text": "d", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -39172,7 +39172,7 @@ "text": [ { "text": "e", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -39189,7 +39189,7 @@ "text": [ { "text": "", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -39279,7 +39279,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -39393,7 +39393,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -39419,7 +39419,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -39524,7 +39524,7 @@ "text": [ { "text": "foo", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -39541,7 +39541,7 @@ "text": [ { "text": "bar", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -39694,7 +39694,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -39711,7 +39711,7 @@ "text": [ { "text": "c", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -39932,7 +39932,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -39949,7 +39949,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -39966,7 +39966,7 @@ "text": [ { "text": "c", - "kind": "text" + "kind": "parameterName" }, { "text": " ", diff --git a/tests/baselines/reference/completionsCommentsFunctionDeclaration.baseline b/tests/baselines/reference/completionsCommentsFunctionDeclaration.baseline index 155d0d1898978..424c3e15bc4bd 100644 --- a/tests/baselines/reference/completionsCommentsFunctionDeclaration.baseline +++ b/tests/baselines/reference/completionsCommentsFunctionDeclaration.baseline @@ -98,7 +98,7 @@ "text": [ { "text": "x", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -207,7 +207,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -224,7 +224,7 @@ "text": [ { "text": "radix", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -305,7 +305,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -386,7 +386,7 @@ "text": [ { "text": "number", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -467,7 +467,7 @@ "text": [ { "text": "number", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -548,7 +548,7 @@ "text": [ { "text": "encodedURI", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -629,7 +629,7 @@ "text": [ { "text": "encodedURIComponent", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -710,7 +710,7 @@ "text": [ { "text": "uri", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -823,7 +823,7 @@ "text": [ { "text": "uriComponent", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -904,7 +904,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -985,7 +985,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -3721,7 +3721,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -4606,7 +4606,7 @@ "text": [ { "text": "x", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -4715,7 +4715,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -4732,7 +4732,7 @@ "text": [ { "text": "radix", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -4813,7 +4813,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -4894,7 +4894,7 @@ "text": [ { "text": "number", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -4975,7 +4975,7 @@ "text": [ { "text": "number", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -5056,7 +5056,7 @@ "text": [ { "text": "encodedURI", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -5137,7 +5137,7 @@ "text": [ { "text": "encodedURIComponent", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -5218,7 +5218,7 @@ "text": [ { "text": "uri", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -5331,7 +5331,7 @@ "text": [ { "text": "uriComponent", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -5412,7 +5412,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -5493,7 +5493,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -7262,7 +7262,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -7949,7 +7949,7 @@ "text": [ { "text": "x", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -8058,7 +8058,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -8075,7 +8075,7 @@ "text": [ { "text": "radix", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -8156,7 +8156,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -8237,7 +8237,7 @@ "text": [ { "text": "number", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -8318,7 +8318,7 @@ "text": [ { "text": "number", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -8399,7 +8399,7 @@ "text": [ { "text": "encodedURI", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -8480,7 +8480,7 @@ "text": [ { "text": "encodedURIComponent", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -8561,7 +8561,7 @@ "text": [ { "text": "uri", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -8674,7 +8674,7 @@ "text": [ { "text": "uriComponent", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -8755,7 +8755,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -8836,7 +8836,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -11572,7 +11572,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", diff --git a/tests/baselines/reference/completionsCommentsFunctionExpression.baseline b/tests/baselines/reference/completionsCommentsFunctionExpression.baseline index 2133879693c86..da29d068b2dfc 100644 --- a/tests/baselines/reference/completionsCommentsFunctionExpression.baseline +++ b/tests/baselines/reference/completionsCommentsFunctionExpression.baseline @@ -98,7 +98,7 @@ "text": [ { "text": "x", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -207,7 +207,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -224,7 +224,7 @@ "text": [ { "text": "radix", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -305,7 +305,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -386,7 +386,7 @@ "text": [ { "text": "number", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -467,7 +467,7 @@ "text": [ { "text": "number", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -548,7 +548,7 @@ "text": [ { "text": "encodedURI", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -629,7 +629,7 @@ "text": [ { "text": "encodedURIComponent", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -710,7 +710,7 @@ "text": [ { "text": "uri", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -823,7 +823,7 @@ "text": [ { "text": "uriComponent", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -904,7 +904,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -985,7 +985,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -2903,7 +2903,7 @@ "text": [ { "text": "s", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -2929,7 +2929,7 @@ "text": [ { "text": "s", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -3835,7 +3835,7 @@ "text": [ { "text": "x", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -3944,7 +3944,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -3961,7 +3961,7 @@ "text": [ { "text": "radix", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -4042,7 +4042,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -4123,7 +4123,7 @@ "text": [ { "text": "number", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -4204,7 +4204,7 @@ "text": [ { "text": "number", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -4285,7 +4285,7 @@ "text": [ { "text": "encodedURI", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -4366,7 +4366,7 @@ "text": [ { "text": "encodedURIComponent", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -4447,7 +4447,7 @@ "text": [ { "text": "uri", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -4560,7 +4560,7 @@ "text": [ { "text": "uriComponent", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -4641,7 +4641,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -4722,7 +4722,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -7607,7 +7607,7 @@ "text": [ { "text": "s", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -7633,7 +7633,7 @@ "text": [ { "text": "s", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -8527,7 +8527,7 @@ "text": [ { "text": "x", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -8636,7 +8636,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -8653,7 +8653,7 @@ "text": [ { "text": "radix", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -8734,7 +8734,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -8815,7 +8815,7 @@ "text": [ { "text": "number", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -8896,7 +8896,7 @@ "text": [ { "text": "number", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -8977,7 +8977,7 @@ "text": [ { "text": "encodedURI", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -9058,7 +9058,7 @@ "text": [ { "text": "encodedURIComponent", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -9139,7 +9139,7 @@ "text": [ { "text": "uri", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -9252,7 +9252,7 @@ "text": [ { "text": "uriComponent", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -9333,7 +9333,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -9414,7 +9414,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -11332,7 +11332,7 @@ "text": [ { "text": "s", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -11358,7 +11358,7 @@ "text": [ { "text": "s", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -12264,7 +12264,7 @@ "text": [ { "text": "x", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -12373,7 +12373,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -12390,7 +12390,7 @@ "text": [ { "text": "radix", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -12471,7 +12471,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -12552,7 +12552,7 @@ "text": [ { "text": "number", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -12633,7 +12633,7 @@ "text": [ { "text": "number", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -12714,7 +12714,7 @@ "text": [ { "text": "encodedURI", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -12795,7 +12795,7 @@ "text": [ { "text": "encodedURIComponent", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -12876,7 +12876,7 @@ "text": [ { "text": "uri", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -12989,7 +12989,7 @@ "text": [ { "text": "uriComponent", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -13070,7 +13070,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -13151,7 +13151,7 @@ "text": [ { "text": "string", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -16036,7 +16036,7 @@ "text": [ { "text": "s", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -16062,7 +16062,7 @@ "text": [ { "text": "s", - "kind": "text" + "kind": "parameterName" }, { "text": " ", diff --git a/tests/baselines/reference/completionsSalsaMethodsOnAssignedFunctionExpressions.baseline b/tests/baselines/reference/completionsSalsaMethodsOnAssignedFunctionExpressions.baseline index 01c7bdd2ea960..a4a1f11dfc762 100644 --- a/tests/baselines/reference/completionsSalsaMethodsOnAssignedFunctionExpressions.baseline +++ b/tests/baselines/reference/completionsSalsaMethodsOnAssignedFunctionExpressions.baseline @@ -408,7 +408,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", diff --git a/tests/baselines/reference/jsDocFunctionSignatures5.baseline b/tests/baselines/reference/jsDocFunctionSignatures5.baseline index cabdccbae4361..7b2c9b728d29c 100644 --- a/tests/baselines/reference/jsDocFunctionSignatures5.baseline +++ b/tests/baselines/reference/jsDocFunctionSignatures5.baseline @@ -185,7 +185,7 @@ "text": [ { "text": "basePath", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -202,7 +202,7 @@ "text": [ { "text": "pattern", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -219,7 +219,7 @@ "text": [ { "text": "type", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -236,7 +236,7 @@ "text": [ { "text": "options", - "kind": "text" + "kind": "parameterName" }, { "text": " ", diff --git a/tests/baselines/reference/jsDocFunctionSignatures6.baseline b/tests/baselines/reference/jsDocFunctionSignatures6.baseline index 6703610328702..2d5e8aebc8397 100644 --- a/tests/baselines/reference/jsDocFunctionSignatures6.baseline +++ b/tests/baselines/reference/jsDocFunctionSignatures6.baseline @@ -180,7 +180,7 @@ "text": [ { "text": "p1", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -197,7 +197,7 @@ "text": [ { "text": "p2", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -214,7 +214,7 @@ "text": [ { "text": "p3", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -231,7 +231,7 @@ "text": [ { "text": "p4", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -436,7 +436,7 @@ "text": [ { "text": "p1", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -453,7 +453,7 @@ "text": [ { "text": "p2", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -470,7 +470,7 @@ "text": [ { "text": "p3", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -487,7 +487,7 @@ "text": [ { "text": "p4", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -692,7 +692,7 @@ "text": [ { "text": "p1", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -709,7 +709,7 @@ "text": [ { "text": "p2", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -726,7 +726,7 @@ "text": [ { "text": "p3", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -743,7 +743,7 @@ "text": [ { "text": "p4", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -948,7 +948,7 @@ "text": [ { "text": "p1", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -965,7 +965,7 @@ "text": [ { "text": "p2", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -982,7 +982,7 @@ "text": [ { "text": "p3", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -999,7 +999,7 @@ "text": [ { "text": "p4", - "kind": "text" + "kind": "parameterName" }, { "text": " ", diff --git a/tests/baselines/reference/quickInfoCommentsClassMembers.baseline b/tests/baselines/reference/quickInfoCommentsClassMembers.baseline index 6306ede8fc434..4fbd66f7bf2f1 100644 --- a/tests/baselines/reference/quickInfoCommentsClassMembers.baseline +++ b/tests/baselines/reference/quickInfoCommentsClassMembers.baseline @@ -5588,7 +5588,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -5762,7 +5762,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -5844,7 +5844,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", diff --git a/tests/baselines/reference/quickInfoCommentsCommentParsing.baseline b/tests/baselines/reference/quickInfoCommentsCommentParsing.baseline index c8988eca2542e..d6e13b4e7051c 100644 --- a/tests/baselines/reference/quickInfoCommentsCommentParsing.baseline +++ b/tests/baselines/reference/quickInfoCommentsCommentParsing.baseline @@ -803,7 +803,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -877,7 +877,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -991,7 +991,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -1008,7 +1008,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -1082,7 +1082,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -1339,7 +1339,7 @@ "text": [ { "text": "e", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -1546,7 +1546,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -1593,7 +1593,7 @@ "text": [ { "text": "e", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -1814,7 +1814,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -1932,7 +1932,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -2056,7 +2056,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -2150,7 +2150,7 @@ "text": [ { "text": "c", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -2244,7 +2244,7 @@ "text": [ { "text": "d", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -2338,7 +2338,7 @@ "text": [ { "text": "e", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -2723,7 +2723,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -2740,7 +2740,7 @@ "text": [ { "text": "c", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -2757,7 +2757,7 @@ "text": [ { "text": "d", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -2774,7 +2774,7 @@ "text": [ { "text": "e", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -2791,7 +2791,7 @@ "text": [ { "text": "", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -2865,7 +2865,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -2964,7 +2964,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -3047,7 +3047,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -3121,7 +3121,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -3235,7 +3235,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -3261,7 +3261,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -3335,7 +3335,7 @@ "text": [ { "text": "foo", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -3409,7 +3409,7 @@ "text": [ { "text": "bar", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -3523,7 +3523,7 @@ "text": [ { "text": "foo", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -3540,7 +3540,7 @@ "text": [ { "text": "bar", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -3622,7 +3622,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -3751,7 +3751,7 @@ "text": [ { "text": "c", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -3963,7 +3963,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -3980,7 +3980,7 @@ "text": [ { "text": "c", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -4164,7 +4164,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -4238,7 +4238,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -4312,7 +4312,7 @@ "text": [ { "text": "c", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -4450,7 +4450,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -4467,7 +4467,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -4484,7 +4484,7 @@ "text": [ { "text": "c", - "kind": "text" + "kind": "parameterName" }, { "text": " ", diff --git a/tests/baselines/reference/quickInfoCommentsFunctionExpression.baseline b/tests/baselines/reference/quickInfoCommentsFunctionExpression.baseline index 1fc21ef81faa5..81722d6918e65 100644 --- a/tests/baselines/reference/quickInfoCommentsFunctionExpression.baseline +++ b/tests/baselines/reference/quickInfoCommentsFunctionExpression.baseline @@ -390,7 +390,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -464,7 +464,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -638,7 +638,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -756,7 +756,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -866,7 +866,7 @@ "text": [ { "text": "s", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -892,7 +892,7 @@ "text": [ { "text": "s", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -1011,7 +1011,7 @@ "text": [ { "text": "s", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -1037,7 +1037,7 @@ "text": [ { "text": "s", - "kind": "text" + "kind": "parameterName" }, { "text": " ", diff --git a/tests/baselines/reference/quickInfoJSDocTags.baseline b/tests/baselines/reference/quickInfoJSDocTags.baseline index aba5c894b474d..8d59248b438e0 100644 --- a/tests/baselines/reference/quickInfoJSDocTags.baseline +++ b/tests/baselines/reference/quickInfoJSDocTags.baseline @@ -471,7 +471,7 @@ "text": [ { "text": "foo", - "kind": "text" + "kind": "parameterName" }, { "text": " ", diff --git a/tests/baselines/reference/quickInfoJsDocTags1.baseline b/tests/baselines/reference/quickInfoJsDocTags1.baseline index 45f63f8435580..b3067551c3af2 100644 --- a/tests/baselines/reference/quickInfoJsDocTags1.baseline +++ b/tests/baselines/reference/quickInfoJsDocTags1.baseline @@ -100,7 +100,7 @@ "text": [ { "text": "T", - "kind": "text" + "kind": "typeParameterName" }, { "text": " ", @@ -152,7 +152,7 @@ "text": [ { "text": "x", - "kind": "text" + "kind": "parameterName" }, { "text": " ", diff --git a/tests/baselines/reference/quickInfoJsDocTags3.baseline b/tests/baselines/reference/quickInfoJsDocTags3.baseline index edcbc2eeaaa99..ab71bea16976d 100644 --- a/tests/baselines/reference/quickInfoJsDocTags3.baseline +++ b/tests/baselines/reference/quickInfoJsDocTags3.baseline @@ -100,7 +100,7 @@ "text": [ { "text": "x", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -117,7 +117,7 @@ "text": [ { "text": "y", - "kind": "text" + "kind": "parameterName" }, { "text": " ", diff --git a/tests/baselines/reference/quickInfoJsDocTags4.baseline b/tests/baselines/reference/quickInfoJsDocTags4.baseline index 23e3b8e953636..097ac25f124b6 100644 --- a/tests/baselines/reference/quickInfoJsDocTags4.baseline +++ b/tests/baselines/reference/quickInfoJsDocTags4.baseline @@ -140,7 +140,7 @@ "text": [ { "text": "x", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -157,7 +157,7 @@ "text": [ { "text": "y", - "kind": "text" + "kind": "parameterName" }, { "text": " ", diff --git a/tests/baselines/reference/quickInfoJsDocTags5.baseline b/tests/baselines/reference/quickInfoJsDocTags5.baseline index bae9bb50771f2..167f3df49184f 100644 --- a/tests/baselines/reference/quickInfoJsDocTags5.baseline +++ b/tests/baselines/reference/quickInfoJsDocTags5.baseline @@ -140,7 +140,7 @@ "text": [ { "text": "x", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -157,7 +157,7 @@ "text": [ { "text": "y", - "kind": "text" + "kind": "parameterName" }, { "text": " ", diff --git a/tests/baselines/reference/quickInfoJsDocTags6.baseline b/tests/baselines/reference/quickInfoJsDocTags6.baseline index dda3750dcfd49..7ab1d074034f5 100644 --- a/tests/baselines/reference/quickInfoJsDocTags6.baseline +++ b/tests/baselines/reference/quickInfoJsDocTags6.baseline @@ -140,7 +140,7 @@ "text": [ { "text": "x", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -157,7 +157,7 @@ "text": [ { "text": "y", - "kind": "text" + "kind": "parameterName" }, { "text": " ", diff --git a/tests/baselines/reference/quickInfoJsDocTextFormatting1.baseline b/tests/baselines/reference/quickInfoJsDocTextFormatting1.baseline index 2cdb8c5676e09..a4df36250a8c9 100644 --- a/tests/baselines/reference/quickInfoJsDocTextFormatting1.baseline +++ b/tests/baselines/reference/quickInfoJsDocTextFormatting1.baseline @@ -114,7 +114,7 @@ "text": [ { "text": "var1", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -131,7 +131,7 @@ "text": [ { "text": "var2", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -270,7 +270,7 @@ "text": [ { "text": "var1", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -287,7 +287,7 @@ "text": [ { "text": "var2", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -426,7 +426,7 @@ "text": [ { "text": "var1", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -443,7 +443,7 @@ "text": [ { "text": "var2", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -582,7 +582,7 @@ "text": [ { "text": "var1", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -599,7 +599,7 @@ "text": [ { "text": "var2", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -738,7 +738,7 @@ "text": [ { "text": "var1", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -755,7 +755,7 @@ "text": [ { "text": "var2", - "kind": "text" + "kind": "parameterName" }, { "text": " ", diff --git a/tests/baselines/reference/signatureHelpCommentsClass.baseline b/tests/baselines/reference/signatureHelpCommentsClass.baseline index a61ef94a79132..b61e286693567 100644 --- a/tests/baselines/reference/signatureHelpCommentsClass.baseline +++ b/tests/baselines/reference/signatureHelpCommentsClass.baseline @@ -415,7 +415,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", diff --git a/tests/baselines/reference/signatureHelpCommentsCommentParsing.baseline b/tests/baselines/reference/signatureHelpCommentsCommentParsing.baseline index 0455ed71ed381..7e9750044ed31 100644 --- a/tests/baselines/reference/signatureHelpCommentsCommentParsing.baseline +++ b/tests/baselines/reference/signatureHelpCommentsCommentParsing.baseline @@ -1032,7 +1032,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -1049,7 +1049,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -1193,7 +1193,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -1210,7 +1210,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -1447,7 +1447,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -1494,7 +1494,7 @@ "text": [ { "text": "e", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -1734,7 +1734,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -1781,7 +1781,7 @@ "text": [ { "text": "e", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -2021,7 +2021,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -2068,7 +2068,7 @@ "text": [ { "text": "e", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -2308,7 +2308,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -2355,7 +2355,7 @@ "text": [ { "text": "e", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -2595,7 +2595,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -2642,7 +2642,7 @@ "text": [ { "text": "e", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -2755,7 +2755,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -2934,7 +2934,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -3358,7 +3358,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -3375,7 +3375,7 @@ "text": [ { "text": "c", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -3392,7 +3392,7 @@ "text": [ { "text": "d", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -3409,7 +3409,7 @@ "text": [ { "text": "e", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -3426,7 +3426,7 @@ "text": [ { "text": "", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -3781,7 +3781,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -3798,7 +3798,7 @@ "text": [ { "text": "c", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -3815,7 +3815,7 @@ "text": [ { "text": "d", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -3832,7 +3832,7 @@ "text": [ { "text": "e", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -3849,7 +3849,7 @@ "text": [ { "text": "", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -4204,7 +4204,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -4221,7 +4221,7 @@ "text": [ { "text": "c", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -4238,7 +4238,7 @@ "text": [ { "text": "d", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -4255,7 +4255,7 @@ "text": [ { "text": "e", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -4272,7 +4272,7 @@ "text": [ { "text": "", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -4627,7 +4627,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -4644,7 +4644,7 @@ "text": [ { "text": "c", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -4661,7 +4661,7 @@ "text": [ { "text": "d", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -4678,7 +4678,7 @@ "text": [ { "text": "e", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -4695,7 +4695,7 @@ "text": [ { "text": "", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -5050,7 +5050,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -5067,7 +5067,7 @@ "text": [ { "text": "c", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -5084,7 +5084,7 @@ "text": [ { "text": "d", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -5101,7 +5101,7 @@ "text": [ { "text": "e", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -5118,7 +5118,7 @@ "text": [ { "text": "", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -5473,7 +5473,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -5490,7 +5490,7 @@ "text": [ { "text": "c", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -5507,7 +5507,7 @@ "text": [ { "text": "d", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -5524,7 +5524,7 @@ "text": [ { "text": "e", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -5541,7 +5541,7 @@ "text": [ { "text": "", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -5665,7 +5665,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -5818,7 +5818,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -5844,7 +5844,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -5988,7 +5988,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -6014,7 +6014,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -6158,7 +6158,7 @@ "text": [ { "text": "foo", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -6175,7 +6175,7 @@ "text": [ { "text": "bar", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -6319,7 +6319,7 @@ "text": [ { "text": "foo", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -6336,7 +6336,7 @@ "text": [ { "text": "bar", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -6548,7 +6548,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -6565,7 +6565,7 @@ "text": [ { "text": "c", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -6770,7 +6770,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -6787,7 +6787,7 @@ "text": [ { "text": "c", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -6992,7 +6992,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -7009,7 +7009,7 @@ "text": [ { "text": "c", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -7214,7 +7214,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -7231,7 +7231,7 @@ "text": [ { "text": "c", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -7538,7 +7538,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -7555,7 +7555,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -7572,7 +7572,7 @@ "text": [ { "text": "c", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -7745,7 +7745,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -7762,7 +7762,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -7779,7 +7779,7 @@ "text": [ { "text": "c", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -7952,7 +7952,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -7969,7 +7969,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -7986,7 +7986,7 @@ "text": [ { "text": "c", - "kind": "text" + "kind": "parameterName" }, { "text": " ", diff --git a/tests/baselines/reference/signatureHelpCommentsFunctionDeclaration.baseline b/tests/baselines/reference/signatureHelpCommentsFunctionDeclaration.baseline index b2f6a0c141d9b..ae0df4a76e18c 100644 --- a/tests/baselines/reference/signatureHelpCommentsFunctionDeclaration.baseline +++ b/tests/baselines/reference/signatureHelpCommentsFunctionDeclaration.baseline @@ -409,7 +409,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", diff --git a/tests/baselines/reference/signatureHelpCommentsFunctionExpression.baseline b/tests/baselines/reference/signatureHelpCommentsFunctionExpression.baseline index e816216e1d48d..61cf0188c30f0 100644 --- a/tests/baselines/reference/signatureHelpCommentsFunctionExpression.baseline +++ b/tests/baselines/reference/signatureHelpCommentsFunctionExpression.baseline @@ -382,7 +382,7 @@ "text": [ { "text": "s", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -408,7 +408,7 @@ "text": [ { "text": "s", - "kind": "text" + "kind": "parameterName" }, { "text": " ", diff --git a/tests/baselines/reference/signatureHelpConstructorCallParamProperties.baseline b/tests/baselines/reference/signatureHelpConstructorCallParamProperties.baseline index 34c4fce1b992a..d99bf82ceaa31 100644 --- a/tests/baselines/reference/signatureHelpConstructorCallParamProperties.baseline +++ b/tests/baselines/reference/signatureHelpConstructorCallParamProperties.baseline @@ -90,7 +90,7 @@ "text": [ { "text": "radius", - "kind": "text" + "kind": "parameterName" }, { "text": " ", diff --git a/tests/baselines/reference/signatureHelpJSMissingPropertyAccess.baseline b/tests/baselines/reference/signatureHelpJSMissingPropertyAccess.baseline index 4e7c06b0639cc..67dfa434799d7 100644 --- a/tests/baselines/reference/signatureHelpJSMissingPropertyAccess.baseline +++ b/tests/baselines/reference/signatureHelpJSMissingPropertyAccess.baseline @@ -283,7 +283,7 @@ "text": [ { "text": "predicate", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -300,7 +300,7 @@ "text": [ { "text": "thisArg", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -546,7 +546,7 @@ "text": [ { "text": "predicate", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -563,7 +563,7 @@ "text": [ { "text": "thisArg", - "kind": "text" + "kind": "parameterName" }, { "text": " ", diff --git a/tests/baselines/reference/signatureHelpTypeArguments2.baseline b/tests/baselines/reference/signatureHelpTypeArguments2.baseline index e79ddcba49d2c..75971fa59ce64 100644 --- a/tests/baselines/reference/signatureHelpTypeArguments2.baseline +++ b/tests/baselines/reference/signatureHelpTypeArguments2.baseline @@ -196,7 +196,7 @@ "text": [ { "text": "T", - "kind": "text" + "kind": "typeParameterName" }, { "text": " ", @@ -222,7 +222,7 @@ "text": [ { "text": "U, V", - "kind": "text" + "kind": "typeParameterName" }, { "text": " ", @@ -239,7 +239,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -256,7 +256,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -477,7 +477,7 @@ "text": [ { "text": "T", - "kind": "text" + "kind": "typeParameterName" }, { "text": " ", @@ -503,7 +503,7 @@ "text": [ { "text": "U, V", - "kind": "text" + "kind": "typeParameterName" }, { "text": " ", @@ -520,7 +520,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -537,7 +537,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -758,7 +758,7 @@ "text": [ { "text": "T", - "kind": "text" + "kind": "typeParameterName" }, { "text": " ", @@ -784,7 +784,7 @@ "text": [ { "text": "U, V", - "kind": "text" + "kind": "typeParameterName" }, { "text": " ", @@ -801,7 +801,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -818,7 +818,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -1039,7 +1039,7 @@ "text": [ { "text": "T", - "kind": "text" + "kind": "typeParameterName" }, { "text": " ", @@ -1065,7 +1065,7 @@ "text": [ { "text": "U, V", - "kind": "text" + "kind": "typeParameterName" }, { "text": " ", @@ -1082,7 +1082,7 @@ "text": [ { "text": "a", - "kind": "text" + "kind": "parameterName" }, { "text": " ", @@ -1099,7 +1099,7 @@ "text": [ { "text": "b", - "kind": "text" + "kind": "parameterName" }, { "text": " ", diff --git a/tests/baselines/reference/signatureHelpWithUnknown.baseline b/tests/baselines/reference/signatureHelpWithUnknown.baseline index 79436405c215a..4a9c81e46906e 100644 --- a/tests/baselines/reference/signatureHelpWithUnknown.baseline +++ b/tests/baselines/reference/signatureHelpWithUnknown.baseline @@ -90,7 +90,7 @@ "text": [ { "text": "x", - "kind": "text" + "kind": "parameterName" }, { "text": " ", diff --git a/tests/baselines/reference/trailingCommaSignatureHelp.baseline b/tests/baselines/reference/trailingCommaSignatureHelp.baseline index 6b4243453eeca..628d1a322d60b 100644 --- a/tests/baselines/reference/trailingCommaSignatureHelp.baseline +++ b/tests/baselines/reference/trailingCommaSignatureHelp.baseline @@ -183,7 +183,7 @@ "text": [ { "text": "radix", - "kind": "text" + "kind": "parameterName" }, { "text": " ", From b35f73ad700abd9640ee08d870e805e1be191939 Mon Sep 17 00:00:00 2001 From: hantatsang Date: Sat, 27 Mar 2021 22:55:35 +1100 Subject: [PATCH 07/14] test: update jsdoc parameterName --- src/testRunner/unittests/tsserver/jsdocTag.ts | 8 ++++---- tests/cases/fourslash/importJsNodeModule3.ts | 4 ++-- .../fourslash/signatureHelpWhenEditingCallExpression.ts | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/testRunner/unittests/tsserver/jsdocTag.ts b/src/testRunner/unittests/tsserver/jsdocTag.ts index 55c386650dbb9..7699c107586e2 100644 --- a/src/testRunner/unittests/tsserver/jsdocTag.ts +++ b/src/testRunner/unittests/tsserver/jsdocTag.ts @@ -418,7 +418,7 @@ x(1)` const tags = [{ name: "param", text: [{ - kind: "text", + kind: "parameterName", text: "y" }, { kind: "space", @@ -489,7 +489,7 @@ x(1)` const tags = [{ name: "param", text: [{ - kind: "text", + kind: "parameterName", text: "y" }, { kind: "space", @@ -603,7 +603,7 @@ foo` tags: [{ name: "param", text: [{ - kind: "text", + kind: "parameterName", text: "x" }, { kind: "space", @@ -652,7 +652,7 @@ foo` tags: [{ name: "param", text: [{ - kind: "text", + kind: "parameterName", text: "x" }, { kind: "space", diff --git a/tests/cases/fourslash/importJsNodeModule3.ts b/tests/cases/fourslash/importJsNodeModule3.ts index 3551a574a34a6..1af13b79190dc 100644 --- a/tests/cases/fourslash/importJsNodeModule3.ts +++ b/tests/cases/fourslash/importJsNodeModule3.ts @@ -37,7 +37,7 @@ verify.signatureHelp({ text: "z(a: number | boolean, b: string[]): string", parameterDocComment: "The first param", tags: [ - { name: "param", text: [{ kind: "text", text: "a" }, { kind: "space", text: " " }, { kind: "text", text: "The first param" }] }, - { name: "param", text: [{ kind: "text", text: "b" }, { kind: "space", text: " " }, { kind: "text", text: "The second param" }] }, + { name: "param", text: [{ kind: "parameterName", text: "a" }, { kind: "space", text: " " }, { kind: "text", text: "The first param" }] }, + { name: "param", text: [{ kind: "parameterName", text: "b" }, { kind: "space", text: " " }, { kind: "text", text: "The second param" }] }, ], }); diff --git a/tests/cases/fourslash/signatureHelpWhenEditingCallExpression.ts b/tests/cases/fourslash/signatureHelpWhenEditingCallExpression.ts index 64da8e16b2e07..0dfbaba95d1b0 100644 --- a/tests/cases/fourslash/signatureHelpWhenEditingCallExpression.ts +++ b/tests/cases/fourslash/signatureHelpWhenEditingCallExpression.ts @@ -10,8 +10,8 @@ ////fo/*1*/ const tags: ReadonlyArray = [ - { name: "param", text: [{ kind: "text", text: "start" }, { kind: "space", text: " " }, { kind: "text", text: "The start" }] }, - { name: "param", text: [{ kind: "text", text: "end" }, { kind: "space", text: " " }, { kind: "text", text: "The end\nMore text" }] }, + { name: "param", text: [{ kind: "parameterName", text: "start" }, { kind: "space", text: " " }, { kind: "text", text: "The start" }] }, + { name: "param", text: [{ kind: "parameterName", text: "end" }, { kind: "space", text: " " }, { kind: "text", text: "The end\nMore text" }] }, ]; verify.noSignatureHelp("1"); edit.insert("o"); From af3f7c995333f64ab1a8e154ba02227c609f1fa2 Mon Sep 17 00:00:00 2001 From: hantatsang Date: Sat, 3 Apr 2021 13:10:07 +1100 Subject: [PATCH 08/14] feat: resolve pr comments --- src/services/jsDoc.ts | 31 ++++++++++++++++--------------- src/services/types.ts | 2 -- src/services/utilities.ts | 13 ++++--------- 3 files changed, 20 insertions(+), 26 deletions(-) diff --git a/src/services/jsDoc.ts b/src/services/jsDoc.ts index 298a6ab0560e7..c2983c5e2b5a4 100644 --- a/src/services/jsDoc.ts +++ b/src/services/jsDoc.ts @@ -79,11 +79,16 @@ namespace ts.JsDoc { "virtual", "yields" ]; - const syntaxKindDisplayPartFunctionDict: Partial> = { - [SyntaxKind.JSDocCallbackTag]: callbackFunctionNamePart, + const syntaxKindDisplayPartFunctionDict = { + [SyntaxKind.JSDocAugmentsTag]: textPart, + [SyntaxKind.JSDocCallbackTag]: typeAliasNamePart, + [SyntaxKind.JSDocImplementsTag]: textPart, [SyntaxKind.JSDocParameterTag]: parameterNamePart, [SyntaxKind.JSDocPropertyTag]: propertyNamePart, - [SyntaxKind.JSDocTypedefTag]: typeDefinitionNamePart, + [SyntaxKind.JSDocSeeTag]: textPart, + [SyntaxKind.JSDocTemplateTag]: typeParameterNamePart, + [SyntaxKind.JSDocTypeTag]: textPart, + [SyntaxKind.JSDocTypedefTag]: typeAliasNamePart, }; let jsDocTagNameCompletionEntries: CompletionEntry[]; let jsDocTagCompletionEntries: CompletionEntry[]; @@ -150,33 +155,29 @@ namespace ts.JsDoc { const { comment, kind } = tag; switch (kind) { case SyntaxKind.JSDocImplementsTag: - return withNode((tag as JSDocImplementsTag).class); + return withNode((tag as JSDocImplementsTag).class, syntaxKindDisplayPartFunctionDict[kind]); case SyntaxKind.JSDocAugmentsTag: - return withNode((tag as JSDocAugmentsTag).class); + return withNode((tag as JSDocAugmentsTag).class, syntaxKindDisplayPartFunctionDict[kind]); case SyntaxKind.JSDocTemplateTag: - return addComment((tag as JSDocTemplateTag).typeParameters.map(tp => tp.getText()).join(", "), typeParameterNamePart); + return addComment((tag as JSDocTemplateTag).typeParameters.map(tp => tp.getText()).join(", "), syntaxKindDisplayPartFunctionDict[kind]); case SyntaxKind.JSDocTypeTag: - return withNode((tag as JSDocTypeTag).typeExpression); + return withNode((tag as JSDocTypeTag).typeExpression, syntaxKindDisplayPartFunctionDict[kind]); case SyntaxKind.JSDocTypedefTag: case SyntaxKind.JSDocCallbackTag: case SyntaxKind.JSDocPropertyTag: case SyntaxKind.JSDocParameterTag: case SyntaxKind.JSDocSeeTag: - const { name } = tag as JSDocCallbackTag | JSDocTypedefTag | JSDocPropertyTag | JSDocParameterTag | JSDocSeeTag; - return name - ? withNode(name, syntaxKindDisplayPartFunctionDict[kind]) - : comment === undefined - ? undefined - : getDisplayPartsFromComment(comment, checker); + const { name } = tag as JSDocTypedefTag | JSDocCallbackTag | JSDocPropertyTag | JSDocParameterTag | JSDocSeeTag; + return name ? withNode(name, syntaxKindDisplayPartFunctionDict[kind]) : comment === undefined ? undefined : getDisplayPartsFromComment(comment, checker); default: return comment === undefined ? undefined : getDisplayPartsFromComment(comment, checker); } - function withNode(node: Node, constructDisplayPartFunc?: ConstructSpecificDisplayPartFunction) { + function withNode(node: Node, constructDisplayPartFunc?: (text: string) => SymbolDisplayPart) { return addComment(node.getText(), constructDisplayPartFunc); } - function addComment(s: string, constructDisplayPartFunc?: ConstructSpecificDisplayPartFunction) { + function addComment(s: string, constructDisplayPartFunc?: (text: string) => SymbolDisplayPart) { return comment ? [!!constructDisplayPartFunc ? constructDisplayPartFunc(s) : textPart(s), spacePart(), ...getDisplayPartsFromComment(comment, checker)] : [textPart(s)]; diff --git a/src/services/types.ts b/src/services/types.ts index 982216dabd025..0d50cab5e624c 100644 --- a/src/services/types.ts +++ b/src/services/types.ts @@ -1015,7 +1015,6 @@ namespace ts { export enum SymbolDisplayPartKind { aliasName, - callbackFunctionName, className, enumName, fieldName, @@ -1033,7 +1032,6 @@ namespace ts { punctuation, space, text, - typeDefinitionName, typeParameterName, enumMemberName, functionName, diff --git a/src/services/utilities.ts b/src/services/utilities.ts index e768271b745a1..5935c6d54ccde 100644 --- a/src/services/utilities.ts +++ b/src/services/utilities.ts @@ -2157,13 +2157,8 @@ namespace ts { return { text, kind: SymbolDisplayPartKind[kind] }; } - /** - * Functions that call displayPart with specific `SymbolDisplayPartKind` - */ - export type ConstructSpecificDisplayPartFunction = (text: string) => ReturnType; - - export function callbackFunctionNamePart(text: string) { - return displayPart(text, SymbolDisplayPartKind.callbackFunctionName); + export function functionNamePart(text: string) { + return displayPart(text, SymbolDisplayPartKind.functionName); } export function spacePart() { @@ -2201,8 +2196,8 @@ namespace ts { return displayPart(text, SymbolDisplayPartKind.text); } - export function typeDefinitionNamePart(text: string) { - return displayPart(text, SymbolDisplayPartKind.typeDefinitionName); + export function typeAliasNamePart(text: string) { + return displayPart(text, SymbolDisplayPartKind.aliasName); } export function typeParameterNamePart(text: string) { From d95f68c6603756294996c883f8ee386f0ce51865 Mon Sep 17 00:00:00 2001 From: hantatsang Date: Sat, 3 Apr 2021 13:13:25 +1100 Subject: [PATCH 09/14] test: add fourslash tests for jsdoc callback, typedef --- .../fourslash/quickInfoJsDocTagsCallback.ts | 19 +++++++++++++++ .../fourslash/quickInfoJsDocTagsTypedef.ts | 24 +++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 tests/cases/fourslash/quickInfoJsDocTagsCallback.ts create mode 100644 tests/cases/fourslash/quickInfoJsDocTagsTypedef.ts diff --git a/tests/cases/fourslash/quickInfoJsDocTagsCallback.ts b/tests/cases/fourslash/quickInfoJsDocTagsCallback.ts new file mode 100644 index 0000000000000..1c1758113e76d --- /dev/null +++ b/tests/cases/fourslash/quickInfoJsDocTagsCallback.ts @@ -0,0 +1,19 @@ +/// + +// @noEmit: true +// @allowJs: true + +// @Filename: quickInfoJsDocTagsCallback.js +/////** +//// * @callback cb/*1*/ +//// * @param {string} x - x comment +//// */ +//// +/////** +//// * @param {/*2*/cb} bar -callback comment +//// */ +////function foo(bar) { +//// bar(bar); +////} + +verify.baselineQuickInfo(); diff --git a/tests/cases/fourslash/quickInfoJsDocTagsTypedef.ts b/tests/cases/fourslash/quickInfoJsDocTagsTypedef.ts new file mode 100644 index 0000000000000..e48b234f5dbc4 --- /dev/null +++ b/tests/cases/fourslash/quickInfoJsDocTagsTypedef.ts @@ -0,0 +1,24 @@ +/// + +// @noEmit: true +// @allowJs: true + +// @Filename: quickInfoJsDocTagsTypedef.js + +/////** +//// * Bar comment +//// * @typedef {Object} /*1*/Bar +//// * @property {string} baz - baz comment +//// * @property {string} qux - qux comment +//// */ +//// +/////** +//// * foo comment +//// * @param {/*2*/Bar} x - x comment +//// * @returns {Bar} +//// */ +////function foo(x) { +//// return x; +////} + +verify.baselineQuickInfo(); From c398a557fc846d8e74ba762fc4637689f16019c2 Mon Sep 17 00:00:00 2001 From: hantatsang Date: Sat, 3 Apr 2021 13:14:45 +1100 Subject: [PATCH 10/14] test: accept baselines --- .../quickInfoJsDocTagsCallback.baseline | 166 +++++++++++++ .../quickInfoJsDocTagsTypedef.baseline | 232 ++++++++++++++++++ 2 files changed, 398 insertions(+) create mode 100644 tests/baselines/reference/quickInfoJsDocTagsCallback.baseline create mode 100644 tests/baselines/reference/quickInfoJsDocTagsTypedef.baseline diff --git a/tests/baselines/reference/quickInfoJsDocTagsCallback.baseline b/tests/baselines/reference/quickInfoJsDocTagsCallback.baseline new file mode 100644 index 0000000000000..75034dd239822 --- /dev/null +++ b/tests/baselines/reference/quickInfoJsDocTagsCallback.baseline @@ -0,0 +1,166 @@ +[ + { + "marker": { + "fileName": "/tests/cases/fourslash/quickInfoJsDocTagsCallback.js", + "position": 19, + "name": "1" + }, + "quickInfo": { + "kind": "type", + "kindModifiers": "", + "textSpan": { + "start": 17, + "length": 2 + }, + "displayParts": [ + { + "text": "type", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "cb", + "kind": "aliasName" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "=", + "kind": "operator" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "x", + "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": "any", + "kind": "keyword" + } + ], + "documentation": [] + } + }, + { + "marker": { + "fileName": "/tests/cases/fourslash/quickInfoJsDocTagsCallback.js", + "position": 73, + "name": "2" + }, + "quickInfo": { + "kind": "type", + "kindModifiers": "", + "textSpan": { + "start": 73, + "length": 2 + }, + "displayParts": [ + { + "text": "type", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "cb", + "kind": "aliasName" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "=", + "kind": "operator" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "(", + "kind": "punctuation" + }, + { + "text": "x", + "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": "any", + "kind": "keyword" + } + ], + "documentation": [] + } + } +] \ No newline at end of file diff --git a/tests/baselines/reference/quickInfoJsDocTagsTypedef.baseline b/tests/baselines/reference/quickInfoJsDocTagsTypedef.baseline new file mode 100644 index 0000000000000..81c88a55887e4 --- /dev/null +++ b/tests/baselines/reference/quickInfoJsDocTagsTypedef.baseline @@ -0,0 +1,232 @@ +[ + { + "marker": { + "fileName": "/tests/cases/fourslash/quickInfoJsDocTagsTypedef.js", + "position": 40, + "name": "1" + }, + "quickInfo": { + "kind": "type", + "kindModifiers": "", + "textSpan": { + "start": 40, + "length": 3 + }, + "displayParts": [ + { + "text": "type", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "Bar", + "kind": "aliasName" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "=", + "kind": "operator" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "{", + "kind": "punctuation" + }, + { + "text": "\n", + "kind": "lineBreak" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "baz", + "kind": "propertyName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + }, + { + "text": ";", + "kind": "punctuation" + }, + { + "text": "\n", + "kind": "lineBreak" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "qux", + "kind": "propertyName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + }, + { + "text": ";", + "kind": "punctuation" + }, + { + "text": "\n", + "kind": "lineBreak" + }, + { + "text": "}", + "kind": "punctuation" + } + ], + "documentation": [ + { + "text": "Bar comment", + "kind": "text" + } + ] + } + }, + { + "marker": { + "fileName": "/tests/cases/fourslash/quickInfoJsDocTagsTypedef.js", + "position": 159, + "name": "2" + }, + "quickInfo": { + "kind": "type", + "kindModifiers": "", + "textSpan": { + "start": 159, + "length": 3 + }, + "displayParts": [ + { + "text": "type", + "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "Bar", + "kind": "aliasName" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "=", + "kind": "operator" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "{", + "kind": "punctuation" + }, + { + "text": "\n", + "kind": "lineBreak" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "baz", + "kind": "propertyName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + }, + { + "text": ";", + "kind": "punctuation" + }, + { + "text": "\n", + "kind": "lineBreak" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "qux", + "kind": "propertyName" + }, + { + "text": ":", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "string", + "kind": "keyword" + }, + { + "text": ";", + "kind": "punctuation" + }, + { + "text": "\n", + "kind": "lineBreak" + }, + { + "text": "}", + "kind": "punctuation" + } + ], + "documentation": [ + { + "text": "Bar comment", + "kind": "text" + } + ] + } + } +] \ No newline at end of file From 8b254c8b9682d315c3cf43a7dc643f28e503e53a Mon Sep 17 00:00:00 2001 From: hantatsang Date: Sat, 3 Apr 2021 13:31:33 +1100 Subject: [PATCH 11/14] test: revert changes for api baselines --- .../reference/api/tsserverlibrary.d.ts | 50 +++++++++---------- tests/baselines/reference/api/typescript.d.ts | 50 +++++++++---------- 2 files changed, 48 insertions(+), 52 deletions(-) diff --git a/tests/baselines/reference/api/tsserverlibrary.d.ts b/tests/baselines/reference/api/tsserverlibrary.d.ts index c30b525ad658d..a2ff8fc1ea29a 100644 --- a/tests/baselines/reference/api/tsserverlibrary.d.ts +++ b/tests/baselines/reference/api/tsserverlibrary.d.ts @@ -6035,32 +6035,30 @@ declare namespace ts { } enum SymbolDisplayPartKind { aliasName = 0, - callbackFunctionName = 1, - className = 2, - enumName = 3, - fieldName = 4, - interfaceName = 5, - keyword = 6, - lineBreak = 7, - numericLiteral = 8, - stringLiteral = 9, - localName = 10, - methodName = 11, - moduleName = 12, - operator = 13, - parameterName = 14, - propertyName = 15, - punctuation = 16, - space = 17, - text = 18, - typeDefinitionName = 19, - typeParameterName = 20, - enumMemberName = 21, - functionName = 22, - regularExpressionLiteral = 23, - link = 24, - linkName = 25, - linkText = 26 + className = 1, + enumName = 2, + fieldName = 3, + interfaceName = 4, + keyword = 5, + lineBreak = 6, + numericLiteral = 7, + stringLiteral = 8, + localName = 9, + methodName = 10, + moduleName = 11, + operator = 12, + parameterName = 13, + propertyName = 14, + punctuation = 15, + space = 16, + text = 17, + typeParameterName = 18, + enumMemberName = 19, + functionName = 20, + regularExpressionLiteral = 21, + link = 22, + linkName = 23, + linkText = 24 } interface SymbolDisplayPart { text: string; diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index 839c518de7fad..0b2d291eeddb5 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -6035,32 +6035,30 @@ declare namespace ts { } enum SymbolDisplayPartKind { aliasName = 0, - callbackFunctionName = 1, - className = 2, - enumName = 3, - fieldName = 4, - interfaceName = 5, - keyword = 6, - lineBreak = 7, - numericLiteral = 8, - stringLiteral = 9, - localName = 10, - methodName = 11, - moduleName = 12, - operator = 13, - parameterName = 14, - propertyName = 15, - punctuation = 16, - space = 17, - text = 18, - typeDefinitionName = 19, - typeParameterName = 20, - enumMemberName = 21, - functionName = 22, - regularExpressionLiteral = 23, - link = 24, - linkName = 25, - linkText = 26 + className = 1, + enumName = 2, + fieldName = 3, + interfaceName = 4, + keyword = 5, + lineBreak = 6, + numericLiteral = 7, + stringLiteral = 8, + localName = 9, + methodName = 10, + moduleName = 11, + operator = 12, + parameterName = 13, + propertyName = 14, + punctuation = 15, + space = 16, + text = 17, + typeParameterName = 18, + enumMemberName = 19, + functionName = 20, + regularExpressionLiteral = 21, + link = 22, + linkName = 23, + linkText = 24 } interface SymbolDisplayPart { text: string; From bf8a0eb4cc95cac5679e223175ff7e33d7a719f7 Mon Sep 17 00:00:00 2001 From: hantatsang Date: Wed, 7 Apr 2021 15:10:27 +1000 Subject: [PATCH 12/14] refactor: naming --- src/services/jsDoc.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/services/jsDoc.ts b/src/services/jsDoc.ts index 231746fb2df05..35f2fbbdeaaef 100644 --- a/src/services/jsDoc.ts +++ b/src/services/jsDoc.ts @@ -80,7 +80,7 @@ namespace ts.JsDoc { "virtual", "yields" ]; - const syntaxKindDisplayPartFunctionDict = { + const tagNameDisplayPart = { [SyntaxKind.JSDocAugmentsTag]: textPart, [SyntaxKind.JSDocCallbackTag]: typeAliasNamePart, [SyntaxKind.JSDocImplementsTag]: textPart, @@ -156,20 +156,20 @@ namespace ts.JsDoc { const { comment, kind } = tag; switch (kind) { case SyntaxKind.JSDocImplementsTag: - return withNode((tag as JSDocImplementsTag).class, syntaxKindDisplayPartFunctionDict[kind]); + return withNode((tag as JSDocImplementsTag).class, tagNameDisplayPart[kind]); case SyntaxKind.JSDocAugmentsTag: - return withNode((tag as JSDocAugmentsTag).class, syntaxKindDisplayPartFunctionDict[kind]); + return withNode((tag as JSDocAugmentsTag).class, tagNameDisplayPart[kind]); case SyntaxKind.JSDocTemplateTag: - return addComment((tag as JSDocTemplateTag).typeParameters.map(tp => tp.getText()).join(", "), syntaxKindDisplayPartFunctionDict[kind]); + return addComment((tag as JSDocTemplateTag).typeParameters.map(tp => tp.getText()).join(", "), tagNameDisplayPart[kind]); case SyntaxKind.JSDocTypeTag: - return withNode((tag as JSDocTypeTag).typeExpression, syntaxKindDisplayPartFunctionDict[kind]); + return withNode((tag as JSDocTypeTag).typeExpression, tagNameDisplayPart[kind]); case SyntaxKind.JSDocTypedefTag: case SyntaxKind.JSDocCallbackTag: case SyntaxKind.JSDocPropertyTag: case SyntaxKind.JSDocParameterTag: case SyntaxKind.JSDocSeeTag: const { name } = tag as JSDocTypedefTag | JSDocCallbackTag | JSDocPropertyTag | JSDocParameterTag | JSDocSeeTag; - return name ? withNode(name, syntaxKindDisplayPartFunctionDict[kind]) : comment === undefined ? undefined : getDisplayPartsFromComment(comment, checker); + return name ? withNode(name, tagNameDisplayPart[kind]) : comment === undefined ? undefined : getDisplayPartsFromComment(comment, checker); default: return comment === undefined ? undefined : getDisplayPartsFromComment(comment, checker); } From 2310b957839ad20264c37c5e518e6692b4bb31bd Mon Sep 17 00:00:00 2001 From: hantatsang Date: Wed, 7 Apr 2021 17:37:28 +1000 Subject: [PATCH 13/14] refactor: code quality --- src/services/jsDoc.ts | 47 +++++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/src/services/jsDoc.ts b/src/services/jsDoc.ts index 35f2fbbdeaaef..3ceb0bb825c9c 100644 --- a/src/services/jsDoc.ts +++ b/src/services/jsDoc.ts @@ -80,17 +80,6 @@ namespace ts.JsDoc { "virtual", "yields" ]; - const tagNameDisplayPart = { - [SyntaxKind.JSDocAugmentsTag]: textPart, - [SyntaxKind.JSDocCallbackTag]: typeAliasNamePart, - [SyntaxKind.JSDocImplementsTag]: textPart, - [SyntaxKind.JSDocParameterTag]: parameterNamePart, - [SyntaxKind.JSDocPropertyTag]: propertyNamePart, - [SyntaxKind.JSDocSeeTag]: textPart, - [SyntaxKind.JSDocTemplateTag]: typeParameterNamePart, - [SyntaxKind.JSDocTypeTag]: textPart, - [SyntaxKind.JSDocTypedefTag]: typeAliasNamePart, - }; let jsDocTagNameCompletionEntries: CompletionEntry[]; let jsDocTagCompletionEntries: CompletionEntry[]; @@ -154,37 +143,55 @@ namespace ts.JsDoc { function getCommentDisplayParts(tag: JSDocTag, checker?: TypeChecker): SymbolDisplayPart[] | undefined { const { comment, kind } = tag; + const namePart = getTagNameDisplayPart(kind); switch (kind) { case SyntaxKind.JSDocImplementsTag: - return withNode((tag as JSDocImplementsTag).class, tagNameDisplayPart[kind]); + return withNode((tag as JSDocImplementsTag).class); case SyntaxKind.JSDocAugmentsTag: - return withNode((tag as JSDocAugmentsTag).class, tagNameDisplayPart[kind]); + return withNode((tag as JSDocAugmentsTag).class); case SyntaxKind.JSDocTemplateTag: - return addComment((tag as JSDocTemplateTag).typeParameters.map(tp => tp.getText()).join(", "), tagNameDisplayPart[kind]); + return addComment((tag as JSDocTemplateTag).typeParameters.map(tp => tp.getText()).join(", ")); case SyntaxKind.JSDocTypeTag: - return withNode((tag as JSDocTypeTag).typeExpression, tagNameDisplayPart[kind]); + return withNode((tag as JSDocTypeTag).typeExpression); case SyntaxKind.JSDocTypedefTag: case SyntaxKind.JSDocCallbackTag: case SyntaxKind.JSDocPropertyTag: case SyntaxKind.JSDocParameterTag: case SyntaxKind.JSDocSeeTag: const { name } = tag as JSDocTypedefTag | JSDocCallbackTag | JSDocPropertyTag | JSDocParameterTag | JSDocSeeTag; - return name ? withNode(name, tagNameDisplayPart[kind]) : comment === undefined ? undefined : getDisplayPartsFromComment(comment, checker); + return name ? withNode(name) : comment === undefined ? undefined : getDisplayPartsFromComment(comment, checker); default: return comment === undefined ? undefined : getDisplayPartsFromComment(comment, checker); } - function withNode(node: Node, constructDisplayPartFunc?: (text: string) => SymbolDisplayPart) { - return addComment(node.getText(), constructDisplayPartFunc); + function withNode(node: Node) { + return addComment(node.getText()); } - function addComment(s: string, constructDisplayPartFunc?: (text: string) => SymbolDisplayPart) { + function addComment(s: string) { return comment - ? [!!constructDisplayPartFunc ? constructDisplayPartFunc(s) : textPart(s), spacePart(), ...getDisplayPartsFromComment(comment, checker)] + ? [namePart(s), spacePart(), ...getDisplayPartsFromComment(comment, checker)] : [textPart(s)]; } } + function getTagNameDisplayPart(kind: SyntaxKind): (text: string) => SymbolDisplayPart { + switch (kind) { + case SyntaxKind.JSDocCallbackTag: + return typeAliasNamePart; + case SyntaxKind.JSDocParameterTag: + return parameterNamePart; + case SyntaxKind.JSDocPropertyTag: + return propertyNamePart; + case SyntaxKind.JSDocTemplateTag: + return typeParameterNamePart; + case SyntaxKind.JSDocTypedefTag: + return typeAliasNamePart; + default: + return textPart; + } + } + export function getJSDocTagNameCompletions(): CompletionEntry[] { return jsDocTagNameCompletionEntries || (jsDocTagNameCompletionEntries = map(jsDocTagNames, tagName => { return { From 5726ca1b9fc598831e7173d51a8d4b1df39170ca Mon Sep 17 00:00:00 2001 From: hantatsang Date: Fri, 9 Apr 2021 09:56:39 +1000 Subject: [PATCH 14/14] refactor: clean up code as to pr comments --- src/services/jsDoc.ts | 3 +-- src/services/utilities.ts | 4 ---- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/services/jsDoc.ts b/src/services/jsDoc.ts index 3ceb0bb825c9c..9fa4de222d0de 100644 --- a/src/services/jsDoc.ts +++ b/src/services/jsDoc.ts @@ -177,8 +177,6 @@ namespace ts.JsDoc { function getTagNameDisplayPart(kind: SyntaxKind): (text: string) => SymbolDisplayPart { switch (kind) { - case SyntaxKind.JSDocCallbackTag: - return typeAliasNamePart; case SyntaxKind.JSDocParameterTag: return parameterNamePart; case SyntaxKind.JSDocPropertyTag: @@ -186,6 +184,7 @@ namespace ts.JsDoc { case SyntaxKind.JSDocTemplateTag: return typeParameterNamePart; case SyntaxKind.JSDocTypedefTag: + case SyntaxKind.JSDocCallbackTag: return typeAliasNamePart; default: return textPart; diff --git a/src/services/utilities.ts b/src/services/utilities.ts index 5935c6d54ccde..6b4330e315517 100644 --- a/src/services/utilities.ts +++ b/src/services/utilities.ts @@ -2157,10 +2157,6 @@ namespace ts { return { text, kind: SymbolDisplayPartKind[kind] }; } - export function functionNamePart(text: string) { - return displayPart(text, SymbolDisplayPartKind.functionName); - } - export function spacePart() { return displayPart(" ", SymbolDisplayPartKind.space); }