Skip to content

Commit c600576

Browse files
committed
generate toc only for classes and interfaces
1 parent bda6d05 commit c600576

File tree

1 file changed

+7
-3
lines changed
  • repo-scripts/api-documenter/src

1 file changed

+7
-3
lines changed

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,19 @@ function generateTocRecursively(
7878
};
7979

8080
for (const member of apiItem.members) {
81-
const fileName = getFilenameForApiItem(member, addFileNameSuffix);
82-
83-
if (fileName) {
81+
// only classes and interfaces have dedicated pages
82+
if (
83+
member.kind === ApiItemKind.Class ||
84+
member.kind === ApiItemKind.Interface
85+
) {
86+
const fileName = getFilenameForApiItem(member, addFileNameSuffix);
8487
entryPointToc.section!.push({
8588
title: member.displayName,
8689
path: `${g3Path}/${fileName}`
8790
});
8891
}
8992
}
93+
9094
toc.push(entryPointToc);
9195
} else {
9296
// travel the api tree to find the next entry point

0 commit comments

Comments
 (0)