Skip to content

Commit fa616b9

Browse files
authored
build: fix formatting for static properties and filter out coercion members (#22823)
* Fixes that there's no space between `static` and the property name. * Filters out the `ngAcceptInputType_` properties from the docs. Fixes #22816.
1 parent a0ad9e5 commit fa616b9

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

tools/dgeni/common/private-docs.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ export function isPublicDoc(doc: ApiDoc) {
3030
if (_isEnforcedPublicDoc(doc)) {
3131
return true;
3232
}
33-
if (_hasDocsPrivateTag(doc) || doc.name.startsWith('_')) {
33+
if (_hasDocsPrivateTag(doc) || doc.name.startsWith('_') ||
34+
doc.name.startsWith('ngAcceptInputType_')) {
3435
return false;
3536
} else if (doc instanceof MemberDoc) {
3637
return !_isInternalMember(doc);

tools/dgeni/processors/docs-private-filter.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ export class DocsPrivateFilter implements Processor {
2727
// Filter out private class members which could be annotated
2828
// with the "@docs-private" tag.
2929
if (isPublic && doc instanceof ClassExportDoc) {
30-
doc.members = doc.members.filter(memberDoc => isPublicDoc(memberDoc));
30+
doc.members = doc.members.filter(isPublicDoc);
31+
doc.statics = doc.statics.filter(isPublicDoc);
3132
}
3233

3334
return isPublic;

tools/dgeni/templates/property.template.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
{%- endif -%}
2828

2929
<p class="docs-api-property-name">
30-
<code>{%- if property.isStatic -%}static {%- endif -%}{$ property.name $}: {$ property.type $}</code>
30+
<code>{%- if property.isStatic -%}static&nbsp;{%- endif -%}{$ property.name $}: {$ property.type $}</code>
3131
</p>
3232
</td>
3333
<td class="docs-api-property-description">{$ property.description | marked | safe $}</td>

0 commit comments

Comments
 (0)