File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -107,9 +107,9 @@ export class ApiItem {
107107 */
108108 public get displayName ( ) : string {
109109 switch ( this . kind ) {
110- case ApiItemKind . CallSignature : return '(call signature )' ;
110+ case ApiItemKind . CallSignature : return '(call)' ;
111111 case ApiItemKind . Constructor : return '(constructor)' ;
112- case ApiItemKind . ConstructSignature : return '(construct signature )' ;
112+ case ApiItemKind . ConstructSignature : return '(new )' ;
113113 case ApiItemKind . IndexSignature : return '(indexer)' ;
114114 case ApiItemKind . Model : return '(model)' ;
115115 }
@@ -166,8 +166,19 @@ export class ApiItem {
166166 }
167167 if ( reversedParts . length !== 0 ) {
168168 reversedParts . push ( '.' ) ;
169- } else if ( ApiParameterListMixin . isBaseClassOf ( current ) ) { // tslint:disable-line:no-use-before-declare
170- reversedParts . push ( '()' ) ;
169+ } else {
170+ switch ( current . kind ) {
171+ case ApiItemKind . CallSignature :
172+ case ApiItemKind . ConstructSignature :
173+ case ApiItemKind . Constructor :
174+ case ApiItemKind . IndexSignature :
175+ // These functional forms don't have a proper name, so we don't append the "()" suffix
176+ break ;
177+ default :
178+ if ( ApiParameterListMixin . isBaseClassOf ( current ) ) { // tslint:disable-line:no-use-before-declare
179+ reversedParts . push ( '()' ) ;
180+ }
181+ }
171182 }
172183 reversedParts . push ( current . displayName ) ;
173184 }
You can’t perform that action at this time.
0 commit comments