aboutsummaryrefslogtreecommitdiffstats
path: root/packages/react-docs/src/utils
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-04-11 15:53:13 +0800
committerFabio Berger <me@fabioberger.com>2018-04-11 15:53:13 +0800
commit7d9c6eafbfd8434c92737a0e9edf8e610984ac90 (patch)
tree7383bb2110215a3502d2bd4302072a7dc48275c1 /packages/react-docs/src/utils
parentde6f757ec821c6e735e0f5e8c2e5621b57c02f55 (diff)
downloaddexon-sol-tools-7d9c6eafbfd8434c92737a0e9edf8e610984ac90.tar
dexon-sol-tools-7d9c6eafbfd8434c92737a0e9edf8e610984ac90.tar.gz
dexon-sol-tools-7d9c6eafbfd8434c92737a0e9edf8e610984ac90.tar.bz2
dexon-sol-tools-7d9c6eafbfd8434c92737a0e9edf8e610984ac90.tar.lz
dexon-sol-tools-7d9c6eafbfd8434c92737a0e9edf8e610984ac90.tar.xz
dexon-sol-tools-7d9c6eafbfd8434c92737a0e9edf8e610984ac90.tar.zst
dexon-sol-tools-7d9c6eafbfd8434c92737a0e9edf8e610984ac90.zip
Add support for nested methods within type declarations. Make sure they render without a callPath.
Diffstat (limited to 'packages/react-docs/src/utils')
-rw-r--r--packages/react-docs/src/utils/typedoc_utils.ts10
1 files changed, 9 insertions, 1 deletions
diff --git a/packages/react-docs/src/utils/typedoc_utils.ts b/packages/react-docs/src/utils/typedoc_utils.ts
index 02f5b4049..e9035def0 100644
--- a/packages/react-docs/src/utils/typedoc_utils.ts
+++ b/packages/react-docs/src/utils/typedoc_utils.ts
@@ -14,6 +14,7 @@ import {
Type,
TypeDocNode,
TypeDocType,
+ TypeDocTypes,
TypeParameter,
TypescriptFunction,
TypescriptMethod,
@@ -221,9 +222,16 @@ export const typeDocUtils = {
const childrenIfExist = !_.isUndefined(entity.children)
? _.map(entity.children, (child: TypeDocNode) => {
- const childTypeIfExists = !_.isUndefined(child.type)
+ let childTypeIfExists = !_.isUndefined(child.type)
? typeDocUtils._convertType(child.type, sections, sectionName, docId)
: undefined;
+ if (child.kindString === KindString.Method) {
+ childTypeIfExists = {
+ name: child.name,
+ typeDocType: TypeDocTypes.Reflection,
+ method: this._convertMethod(child, isConstructor, sections, sectionName, docId),
+ };
+ }
const c: CustomTypeChild = {
name: child.name,
type: childTypeIfExists,