File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments