aboutsummaryrefslogtreecommitdiffstats
path: root/packages/react-docs
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-08-15 08:41:03 +0800
committerFabio Berger <me@fabioberger.com>2018-08-15 08:41:03 +0800
commit83e3bb899ed88c8ac32331d2f1b533e52d5ad8cd (patch)
treed4f869ee80e81ee6fdcff83dcc53517acd07744f /packages/react-docs
parentcb5d8d75bf03910d1e763eb34907ada296ed3062 (diff)
downloaddexon-sol-tools-83e3bb899ed88c8ac32331d2f1b533e52d5ad8cd.tar.gz
dexon-sol-tools-83e3bb899ed88c8ac32331d2f1b533e52d5ad8cd.tar.zst
dexon-sol-tools-83e3bb899ed88c8ac32331d2f1b533e52d5ad8cd.zip
Move purging private underscored items to the doc json generation phase
Diffstat (limited to 'packages/react-docs')
-rw-r--r--packages/react-docs/src/components/signature_block.tsx3
-rw-r--r--packages/react-docs/src/utils/typedoc_utils.ts21
2 files changed, 8 insertions, 16 deletions
diff --git a/packages/react-docs/src/components/signature_block.tsx b/packages/react-docs/src/components/signature_block.tsx
index 934232efe..2818d9c5f 100644
--- a/packages/react-docs/src/components/signature_block.tsx
+++ b/packages/react-docs/src/components/signature_block.tsx
@@ -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
diff --git a/packages/react-docs/src/utils/typedoc_utils.ts b/packages/react-docs/src/utils/typedoc_utils.ts
index ab5408ec2..9843ec9fa 100644
--- a/packages/react-docs/src/utils/typedoc_utils.ts
+++ b/packages/react-docs/src/utils/typedoc_utils.ts
@@ -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: