@@ -36,10 +36,10 @@ import {
3636 ApiDeclarationMixin ,
3737 ApiStaticMixin ,
3838 ApiPropertyItem ,
39- ApiFunctionLikeMixin ,
4039 ApiInterface ,
4140 Excerpt ,
42- ApiMethodItem
41+ ApiParameterListMixin ,
42+ ApiReturnTypeMixin
4343} from '@microsoft/api-extractor' ;
4444
4545import { CustomDocNodes } from '../nodes/CustomDocNodeKind' ;
@@ -106,7 +106,7 @@ export class MarkdownDocumenter {
106106 output . appendNode ( new DocHeading ( { configuration, title : `${ scopedName } namespace` } ) ) ;
107107 break ;
108108 case ApiItemKind . Package :
109- const unscopedPackageName : string = PackageName . getUnscopedName ( apiItem . name ) ;
109+ const unscopedPackageName : string = PackageName . getUnscopedName ( apiItem . displayName ) ;
110110 output . appendNode ( new DocHeading ( { configuration, title : `${ unscopedPackageName } package` } ) ) ;
111111 break ;
112112 case ApiItemKind . Property :
@@ -175,7 +175,7 @@ export class MarkdownDocumenter {
175175 break ;
176176 case ApiItemKind . Method :
177177 case ApiItemKind . MethodSignature :
178- this . _writeFunctionLikeTables ( output , apiItem as ApiFunctionLikeMixin ) ;
178+ this . _writeParameterTables ( output , apiItem as ApiParameterListMixin ) ;
179179 break ;
180180 case ApiItemKind . Namespace :
181181 break ;
@@ -515,14 +515,14 @@ export class MarkdownDocumenter {
515515 /**
516516 * GENERATE PAGE: FUNCTION-LIKE
517517 */
518- private _writeFunctionLikeTables ( output : DocSection , apiFunctionLike : ApiFunctionLikeMixin ) : void {
518+ private _writeParameterTables ( output : DocSection , apiParameterListMixin : ApiParameterListMixin ) : void {
519519 const configuration : TSDocConfiguration = this . _tsdocConfiguration ;
520520
521521 const parametersTable : DocTable = new DocTable ( { configuration,
522522 headerTitles : [ 'Parameter' , 'Type' , 'Description' ]
523523 } ) ;
524524
525- for ( const apiParameter of apiFunctionLike . parameters ) {
525+ for ( const apiParameter of apiParameterListMixin . parameters ) {
526526 const parameterDescription : DocSection = new DocSection ( { configuration } ) ;
527527 if ( apiParameter . tsdocParamBlock ) {
528528 this . _appendSection ( parameterDescription , apiParameter . tsdocParamBlock . content ) ;
@@ -550,8 +550,8 @@ export class MarkdownDocumenter {
550550 output . appendNode ( parametersTable ) ;
551551 }
552552
553- if ( apiFunctionLike instanceof ApiMethodItem ) {
554- const returnTypeExcerpt : Excerpt = apiFunctionLike . returnTypeExcerpt ;
553+ if ( ApiReturnTypeMixin . isBaseClassOf ( apiParameterListMixin ) ) {
554+ const returnTypeExcerpt : Excerpt = apiParameterListMixin . returnTypeExcerpt ;
555555 output . appendNode (
556556 new DocParagraph ( { configuration } , [
557557 new DocEmphasisSpan ( { configuration, bold : true } , [
@@ -566,9 +566,9 @@ export class MarkdownDocumenter {
566566 ] )
567567 ) ;
568568
569- if ( apiFunctionLike instanceof ApiDocumentedItem ) {
570- if ( apiFunctionLike . tsdocComment && apiFunctionLike . tsdocComment . returnsBlock ) {
571- this . _appendSection ( output , apiFunctionLike . tsdocComment . returnsBlock . content ) ;
569+ if ( apiParameterListMixin instanceof ApiDocumentedItem ) {
570+ if ( apiParameterListMixin . tsdocComment && apiParameterListMixin . tsdocComment . returnsBlock ) {
571+ this . _appendSection ( output , apiParameterListMixin . tsdocComment . returnsBlock . content ) ;
572572 }
573573 }
574574 }
@@ -672,7 +672,7 @@ export class MarkdownDocumenter {
672672 new DocLinkTag ( {
673673 configuration : this . _tsdocConfiguration ,
674674 tagName : '@link' ,
675- linkText : hierarchyItem . name ,
675+ linkText : hierarchyItem . displayName ,
676676 urlDestination : this . _getLinkFilenameForApiItem ( hierarchyItem )
677677 } )
678678 ] ) ;
@@ -719,8 +719,8 @@ export class MarkdownDocumenter {
719719 let baseName : string = '' ;
720720 for ( const hierarchyItem of apiItem . getHierarchy ( ) ) {
721721 // For overloaded methods, add a suffix such as "MyClass.myMethod_2".
722- let qualifiedName : string = hierarchyItem . name ;
723- if ( ApiFunctionLikeMixin . isBaseClassOf ( hierarchyItem ) ) {
722+ let qualifiedName : string = hierarchyItem . displayName ;
723+ if ( ApiParameterListMixin . isBaseClassOf ( hierarchyItem ) ) {
724724 if ( hierarchyItem . overloadIndex > 0 ) {
725725 qualifiedName += `_${ hierarchyItem . overloadIndex } ` ;
726726 }
@@ -731,7 +731,7 @@ export class MarkdownDocumenter {
731731 case ApiItemKind . EntryPoint :
732732 break ;
733733 case ApiItemKind . Package :
734- baseName = PackageName . getUnscopedName ( hierarchyItem . name ) ;
734+ baseName = PackageName . getUnscopedName ( hierarchyItem . displayName ) ;
735735 break ;
736736 default :
737737 baseName += '.' + qualifiedName ;
0 commit comments