Skip to content

Commit e202531

Browse files
devversionmmalerba
authored andcommitted
build: do not show inherited protected members in api docs (#17430)
As per discussion in the team meeting, we do not want to show the API documentation of inherited protected members. The protected members should be only displayed in the API doc of the class that _declares_ these.
1 parent 818a8c7 commit e202531

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tools/dgeni/processors/merge-inherited-properties.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,12 @@ export class MergeInheritedProperties implements Processor {
2020
// Note that we need to get check all base documents. We cannot assume
2121
// that directive base documents already have merged inherited members.
2222
getInheritedDocsOfClass(doc).forEach(d => {
23-
d.members.forEach(member => this._addMemberDocIfNotPresent(doc, member));
23+
d.members.forEach(member => {
24+
// only add inherited class members which are not "protected" or "private".
25+
if (member.accessibility === 'public') {
26+
this._addMemberDocIfNotPresent(doc, member);
27+
}
28+
});
2429
});
2530
}
2631

0 commit comments

Comments
 (0)