File tree 2 files changed +6
-18
lines changed
repo-scripts/api-documenter/src
2 files changed +6
-18
lines changed Original file line number Diff line number Diff line change @@ -918,6 +918,11 @@ export class MarkdownDocumenter {
918
918
}
919
919
}
920
920
921
+ if ( functionsTable . rows . length > 0 ) {
922
+ output . push ( new DocHeading ( { configuration, title : 'Functions' } ) ) ;
923
+ output . push ( functionsTable ) ;
924
+ }
925
+
921
926
if ( classesTable . rows . length > 0 ) {
922
927
output . push ( new DocHeading ( { configuration, title : 'Classes' } ) ) ;
923
928
output . push ( classesTable ) ;
@@ -927,10 +932,6 @@ export class MarkdownDocumenter {
927
932
output . push ( new DocHeading ( { configuration, title : 'Enumerations' } ) ) ;
928
933
output . push ( enumerationsTable ) ;
929
934
}
930
- if ( functionsTable . rows . length > 0 ) {
931
- output . push ( new DocHeading ( { configuration, title : 'Functions' } ) ) ;
932
- output . push ( functionsTable ) ;
933
- }
934
935
935
936
if ( interfacesTable . rows . length > 0 ) {
936
937
output . push ( new DocHeading ( { configuration, title : 'Interfaces' } ) ) ;
Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ function generateTocRecursively(
73
73
addFileNameSuffix : boolean ,
74
74
toc : ITocItem [ ]
75
75
) {
76
+ // generate toc item only for entry points
76
77
if ( apiItem . kind === ApiItemKind . EntryPoint ) {
77
78
// Entry point
78
79
const entryPointName = ( apiItem . canonicalReference
@@ -83,20 +84,6 @@ function generateTocRecursively(
83
84
section : [ ]
84
85
} ;
85
86
86
- for ( const member of apiItem . members ) {
87
- // only classes and interfaces have dedicated pages
88
- if (
89
- member . kind === ApiItemKind . Class ||
90
- member . kind === ApiItemKind . Interface
91
- ) {
92
- const fileName = getFilenameForApiItem ( member , addFileNameSuffix ) ;
93
- entryPointToc . section ! . push ( {
94
- title : member . displayName ,
95
- path : `${ g3Path } /${ fileName } `
96
- } ) ;
97
- }
98
- }
99
-
100
87
toc . push ( entryPointToc ) ;
101
88
} else {
102
89
// travel the api tree to find the next entry point
You can’t perform that action at this time.
0 commit comments