aboutsummaryrefslogtreecommitdiffstats
path: root/packages/react-docs/src/utils
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-04-12 07:56:33 +0800
committerGitHub <noreply@github.com>2018-04-12 07:56:33 +0800
commit5eb90697c824f1c98467cdb6cd71dbb94ff70805 (patch)
treeb5e02ec65e8ae5298761f07eae18df145024bb16 /packages/react-docs/src/utils
parentc47fb8f9a83d409c092dd7449054fa16cf0fa1c9 (diff)
parentfaedd2fa0b2582ea24ca4624e13ea7466de18408 (diff)
downloaddexon-0x-contracts-5eb90697c824f1c98467cdb6cd71dbb94ff70805.tar
dexon-0x-contracts-5eb90697c824f1c98467cdb6cd71dbb94ff70805.tar.gz
dexon-0x-contracts-5eb90697c824f1c98467cdb6cd71dbb94ff70805.tar.bz2
dexon-0x-contracts-5eb90697c824f1c98467cdb6cd71dbb94ff70805.tar.lz
dexon-0x-contracts-5eb90697c824f1c98467cdb6cd71dbb94ff70805.tar.xz
dexon-0x-contracts-5eb90697c824f1c98467cdb6cd71dbb94ff70805.tar.zst
dexon-0x-contracts-5eb90697c824f1c98467cdb6cd71dbb94ff70805.zip
Merge pull request #519 from 0xProject/fix/docImprovements
Doc fixes and improvements
Diffstat (limited to 'packages/react-docs/src/utils')
-rw-r--r--packages/react-docs/src/utils/typedoc_utils.ts11
1 files changed, 10 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..9c89b135a 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,
@@ -387,6 +395,7 @@ export const typeDocUtils = {
name: entity.name,
comment,
isOptional,
+ defaultValue: entity.defaultValue,
type,
};
return parameter;