Skip to content

Commit 8d55fe0

Browse files
PR feedback.
1 parent a5bd919 commit 8d55fe0

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

src/services/services.ts

+13-11
Original file line numberDiff line numberDiff line change
@@ -3379,17 +3379,19 @@ module ts {
33793379
}
33803380

33813381
function pushTypePart(symbolKind: string) {
3382-
if (symbolKind === ScriptElementKind.variableElement ||
3383-
symbolKind === ScriptElementKind.functionElement ||
3384-
symbolKind === ScriptElementKind.letElement ||
3385-
symbolKind === ScriptElementKind.constElement ||
3386-
symbolKind === ScriptElementKind.constructorImplementationElement) {
3387-
displayParts.push(textOrKeywordPart(symbolKind));
3388-
}
3389-
else {
3390-
displayParts.push(punctuationPart(SyntaxKind.OpenParenToken));
3391-
displayParts.push(textOrKeywordPart(symbolKind));
3392-
displayParts.push(punctuationPart(SyntaxKind.CloseParenToken));
3382+
switch (symbolKind) {
3383+
case ScriptElementKind.variableElement:
3384+
case ScriptElementKind.functionElement:
3385+
case ScriptElementKind.letElement:
3386+
case ScriptElementKind.constElement:
3387+
case ScriptElementKind.constructorImplementationElement:
3388+
displayParts.push(textOrKeywordPart(symbolKind));
3389+
return;
3390+
default:
3391+
displayParts.push(punctuationPart(SyntaxKind.OpenParenToken));
3392+
displayParts.push(textOrKeywordPart(symbolKind));
3393+
displayParts.push(punctuationPart(SyntaxKind.CloseParenToken));
3394+
return;
33933395
}
33943396
}
33953397

0 commit comments

Comments
 (0)