aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-08-03 23:14:14 +0800
committerFabio Berger <me@fabioberger.com>2018-08-03 23:14:14 +0800
commit0d3d9dad846d01e84be3b52d48bfabd9e1853b66 (patch)
treec08d9de9d5d6d5a011c584f21f5c9075c8e06a98 /packages
parentb8c8258404fa7959b71dd9e87fba16d32b57a868 (diff)
downloaddexon-sol-tools-0d3d9dad846d01e84be3b52d48bfabd9e1853b66.tar
dexon-sol-tools-0d3d9dad846d01e84be3b52d48bfabd9e1853b66.tar.gz
dexon-sol-tools-0d3d9dad846d01e84be3b52d48bfabd9e1853b66.tar.bz2
dexon-sol-tools-0d3d9dad846d01e84be3b52d48bfabd9e1853b66.tar.lz
dexon-sol-tools-0d3d9dad846d01e84be3b52d48bfabd9e1853b66.tar.xz
dexon-sol-tools-0d3d9dad846d01e84be3b52d48bfabd9e1853b66.tar.zst
dexon-sol-tools-0d3d9dad846d01e84be3b52d48bfabd9e1853b66.zip
Don't process functions beginning with underscores
Diffstat (limited to 'packages')
-rw-r--r--packages/react-docs/src/utils/typedoc_utils.ts13
1 files changed, 11 insertions, 2 deletions
diff --git a/packages/react-docs/src/utils/typedoc_utils.ts b/packages/react-docs/src/utils/typedoc_utils.ts
index ad794c0fa..b74b9562b 100644
--- a/packages/react-docs/src/utils/typedoc_utils.ts
+++ b/packages/react-docs/src/utils/typedoc_utils.ts
@@ -154,8 +154,17 @@ export const typeDocUtils = {
case KindString.Function:
if (entity.flags.isExported) {
- const func = typeDocUtils._convertFunction(entity, docsInfo.sections, sectionName, docsInfo.id);
- docSection.functions.push(func);
+ const funcName = (entity as TypeDocNode).signatures[0].name;
+ const isPublicFunc = !_.startsWith(funcName, '_');
+ if (isPublicFunc) {
+ const func = typeDocUtils._convertFunction(
+ entity,
+ docsInfo.sections,
+ sectionName,
+ docsInfo.id,
+ );
+ docSection.functions.push(func);
+ }
}
break;