Skip to content

Commit a076fed

Browse files
committed
create toc only for entry points
1 parent 0a0a91c commit a076fed

File tree

1 file changed

+1
-14
lines changed
  • repo-scripts/api-documenter/src

1 file changed

+1
-14
lines changed

repo-scripts/api-documenter/src/toc.ts

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ function generateTocRecursively(
7373
addFileNameSuffix: boolean,
7474
toc: ITocItem[]
7575
) {
76+
// generate toc item only for entry points
7677
if (apiItem.kind === ApiItemKind.EntryPoint) {
7778
// Entry point
7879
const entryPointName = (apiItem.canonicalReference
@@ -83,20 +84,6 @@ function generateTocRecursively(
8384
section: []
8485
};
8586

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-
10087
toc.push(entryPointToc);
10188
} else {
10289
// travel the api tree to find the next entry point

0 commit comments

Comments
 (0)