Move purging private underscored items to the doc json generation phase

This commit is contained in:
Fabio Berger
2018-08-14 17:41:03 -07:00
parent cb5d8d75bf
commit 83e3bb899e
4 changed files with 27 additions and 30 deletions

View File

@@ -44,9 +44,6 @@ export class SignatureBlock extends React.Component<SignatureBlockProps, Signatu
}
public render(): React.ReactNode {
const method = this.props.method;
if (typeDocUtils.isPrivateOrProtectedProperty(method.name)) {
return null;
}
return (
<div

View File

@@ -43,9 +43,6 @@ export const typeDocUtils = {
isProperty(entity: TypeDocNode): boolean {
return entity.kindString === KindString.Property;
},
isPrivateOrProtectedProperty(propertyName: string): boolean {
return _.startsWith(propertyName, '_');
},
getModuleDefinitionsBySectionName(versionDocObj: TypeDocNode, configModulePaths: string[]): TypeDocNode[] {
const moduleDefinitions: TypeDocNode[] = [];
const jsonModules = versionDocObj.children;
@@ -217,16 +214,14 @@ export const typeDocUtils = {
break;
case KindString.Property:
if (!typeDocUtils.isPrivateOrProtectedProperty(entity.name)) {
const property = typeDocUtils._convertProperty(
entity,
docsInfo.sections,
sectionName,
docsInfo.id,
classNames,
);
docSection.properties.push(property);
}
const property = typeDocUtils._convertProperty(
entity,
docsInfo.sections,
sectionName,
docsInfo.id,
classNames,
);
docSection.properties.push(property);
break;
case KindString.Variable: